Jump to content
Search Community

santi

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by santi

  1. No prob! You can never cover every use case . We wrap the timeline & tween classes, so I decided to go ahead and shoot my own foot... basically when reverting the timeline, I update the tween instances .c value to the current one for tweens that set a specific var when created, and store the original .c so it can be restored if the timeline is replayed.... I'm still looking for what's going to fail, but it seems to work on my tests. Ugly as hell, but is maybe an option nonetheless...
  2. Hi! Thanks for the reply! Our app is used to build application prototypes, and animations are defined by the user, and he can then hook 'back' transitions which reverse the animations he defined. Almost everything works OK using play/reverse for these kind of things, but in the case of scroll, where he can change it by hand, it doesn't. So, I can't create a new animation since this plugs in a general mechanism for animations which use reverse for everything else.
  3. Hi, I have an animation that changes the scroll of a panel from 0 to X value. Later, the user changes the scroll by hand, and then I want to reverse than animation so that scroll goes back to 0. However, the animation seems to start from X and goes to 0 instead from the current value. Is there any way for the revert animation to start at the current value and go back to the original one instead of using the to value? Thanks!
  4. Thanks for the replies! I guess I'll try to keep track of my current timelines and use onComplete/onRevertCompleted as both suggested. I thought about checking for active, but I would want to avoid that if possible.
  5. Hi, I wondered if there was a way to get notified when the root timeline gets idle, like, when there are no pending animations at all on the greensock engine. In our app, we need to highlight some elements for which we use a box shadow, but we would want to disable that effect when there's any kind of animation. It would be great if we could be notified when greensock gets some new animations and when it goes back to an idle state. Ideas? Thanks!
  6. You sir, are amazing . Works perfectly, saved my day. Thanks for the additional code comments and the excellent support!
  7. I'm in a similar situation. It could be useful to have a way to inject a simulated clock to drive the greensock Ticker, that lets you say 'x milliseconds passed' so that greensock reacts using this simulated time. I think it can be done by hand by replacing the _getTime function in TweenLite.js, but would be great if there was out of the box support for this.
  8. I created a fiddle, in case it's easier to check it out: http://jsfiddle.net/m2JbE/2/
  9. Hi! I'm having some issues with the onComplete and onReverseComplete callbacks for tweens of 0 duration added to a timeline. Generally, they work as I expected, but sometimes they do not get called, or onComplete gets called when onReverseComplete should have been called. Since they work OK most times, my app kind of relies on them being called at the right times, but I started getting some issues becuase it seems they aren't. In my app, the animations are created dynamically, so reproducing it is somewhat complicated, but I built and attached an example that shows the issue. The code goes like: var valueAnimation = TweenLite.to( document.getElementById("value"), 0.5, { innerText: 300 }, { innerText: 0 }); var textAnimation = new TweenLite({}, 0, { immediateRender: true, onComplete: function() { document.getElementById('button').innerText = "Reverse"; }, onReverseComplete: function() { document.getElementById('button').innerText = "Play forward"; } }); timeline = new TimelineLite({ paused: false, autoRemoveChildren: false }) timeline.add(textAnimation); timeline.add(valueAnimation); timeline.play(); To reproduce it, open the reverse_test.html file and follow the instructions. Looking for similar issues, I read that onReverseCompleted was not called on child animations since what is actually reverted is the parent timeline; but the issue is that, most times, it's being called, and I ended up counting on it. Please, let me know if I can provide any additional info. Thanks! reverse_test.zip
  10. Amazing! More than what I expected . Thanks!
  11. Thanks you both for the prompt reply! It's very good to have multiple alternatives . I was thinking in something like Jamie's, but I agree that mapping numbers to [] of values as a way to change them is quite flexible. Tks!
  12. Hi! I need to set a text property of a javascript object at a specific time on a timeline, and when reversing, the text should be reverted to its previous value. Is there a simple way to accomplish this? I though delatedCall might help, but it seems I would need to handle the setting of the new/old values by hand checking if the timeline is reversed. Maybe a stepped easing? I tried using to/fromTo animations to do so, but the text is prefixed with a 0/NaN, etc; I guess it's trying to animate it as if it where a number. I was unable to find this question on the forums, but I apologize if it was asked before. Great framework! Thanks in advance.
×
×
  • Create New...