Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Secretmapper

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

2,023 profile views

Secretmapper's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. To clarify, this is my code. I need to get 'target': TweenMax.staggerTo($('mini-color-memory-box').children(), 1, { boxShadow: "0px 0px 30px 5px " + target.parentElement.attributes.color, backgroundColor:target.parentElement.attributes.color, borderColor:target.parentElement.attributes.color, repeat:1, yoyo:true, //onComplete: function(){ // console.log(this.target.parentElement.attributes.color); //} }, 1); Also, I actually have a utility function for the above that returns the tween. However, how can I get an attribute of the target being tweened? TweenMax.staggerTo($('mini-color-memory-box').children(), 1, myFunctionThatReturnsTheAbove(//how do I pass in my target attribute), 1);
  2. How do I get the element that is being tweened?
  3. Haha you make it look so easy! Thanks! P.S.: a typo in the style-class, I was rushing it
  4. I know that it might be hard (if not outright impossible) to achieve what I want, but gsap always surprises me (I used it back in as3) that I think it's worth it to ask. Is it possible to animate a div parent exclusive of the child? What I mean by this is let's say I have a div like so: <div style="colored-rectangle"> <p>My Content</p> </div> See the div is a 'colored-rectangle'. I want to animate my text and the colored rectangle separately from each other. I'm using TweenLite.from();, and I want my text to appear from the top while the div comes in from the bottom. Thanks!
  5. Interesting, I never saw this method before thanks! However, how would I set the duration for an 'indefinite amount of time', and resume only after an event? Also, one problem I find here is that it will run the tween if ever I pause at a time where my code is still checking non-tween. I can't word it nicely, but here is some pseudocode: update() { //lines and lines of code TweenLite.to(view, 0.4, { scaleX:0.9, scaleY:0.9, ease:Linear.easeNone, onComplete:removeDead } ); } Thing is, If I'm running '//lines and lines of code' while I export root, the next tweenLite command is going to run! Sorry, I'm new in using GSAP. I probably should have read the docs and used TimeLine more EDIT: I was searching in google and found this: http://forums.greensock.com/topic/6775-use-gsap-ticker-for-htmlcanvas-games-update/?hl=game+loop. There's a ticker function in Greensock? I can't find it in the docs.
  6. Hello. I have used TweenLite and It's been great! Very easy to use and loads of features. However, I have a quick question for any of you out there. I'm making a game for class, and I have made the game loop have an update() function, and pausing the game means not calling that function. Now, you could probably already guess where this question is headed, but: What would be the best way to handle this if I am aiming to use TweenLite? Pausing my game simply means not calling update, however, tweenlite relies on one call, not repetitive calls, so not calling update would obviously mean that tweenLite still runs. Help Anyone? I know I could just call pause on them every time the game pauses, but If you know of any other more 'elegant' solutions, mind posting?
×