40lb Suit of Bees
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by 40lb Suit of Bees
-
-
Awesome! That makes sense.
Well, I have another one for you. In the code below. If I invoke the myTimeline.stop() method, then the myTimeline.gotoAndPlay() method, it doesn't resume playing the timeline again. However, if I invoke an extra myTimeline.play() method before the gotoAndPlay method it works.
import com.greensock.*; //create the timeline var myTimeline:TimelineLite = new TimelineLite(); myTimeline.insert(TweenLite.from(square1, .5, {_x:-50}), 0); myTimeline.insert(TweenLite.from(square2, .5, {_x:-50}), 2); myTimeline.insert(TweenLite.from(square3, .5, {_x:-50}), 4); // With stop and gotoAndPlay (breaks) button1.onRollOver = function() { myTimeline.stop(); myTimeline.gotoAndPlay(0); } // With stop, play and gotoAndPlay (works) button2.onRollOver = function() { myTimeline.stop(); myTimeline.play(); myTimeline.gotoAndPlay(2); } button3.onRollOver = function() { myTimeline.gotoAndPlay(4); }
And, is it possible to add a stop() action into the timeline at a certain time, the same way you can add labels?
Thanks again for your help.
-
This may or may not be a bug. However, when using the following code with ".from" the sequencing breaks (everything happens at once and myTimeline.stop() doesn't work...
import com.greensock.*; //create the timeline var myTimeline:TimelineLite = new TimelineLite(); myTimeline.insert(new TweenLite.from(square1, .5, {_x:-50}), 0); myTimeline.insert(new TweenLite.from(square2, .5, {_x:-50}), 2); myTimeline.insert(new TweenLite.from(square3, .5, {_x:-50}), 4); //stop the timeline myTimeline.stop();
However, using runBackwards:true works, but the objects properties aren't set until the delay time is reached ...
import com.greensock.*; //create the timeline var myTimeline:TimelineLite = new TimelineLite(); myTimeline.insert(new TweenLite(square1, .5, {_x:-50, runBackwards:true}), 0); myTimeline.insert(new TweenLite(square2, .5, {_x:-50, runBackwards:true}), 2); myTimeline.insert(new TweenLite(square3, .5, {_x:-50, runBackwards:true}), 4); //stop the timeline //myTimeline.stop();
Again, not sure if that's a bug or I'm just misunderstanding how to and from work.
THanks again
-
Thanks for the super fast response!
Forget about my second question about the "label" Just realized I was trying to put that in the stagger property and not the start time property.
THanks
-
Hello,
Awesome classes by the way.
* VERSION: 0.99
* DATE: 10/4/2009
* AS2
I'm receiving the following error from TimelineLite. Attribute used outside of class. I believe the getChildren() function is missing a closing }.
also, is it possible to specify a label name in the insertMultiple function instead of a number (seconds)..ie
myTimeline.insertMultiple([new TweenLite(mc, 1, {y:"100"}), new TweenLite(mc2, 1, {y:"120"}), new TweenLite(mc3, 1, {y:"140"})], 0, TweenAlign.START, "label");
THanks
TimelineLite tween from problem
in GSAP (Flash)
Posted
Thanks for the feedback. The gotoAndPlay() method is working. I decided on option 2 for the stop() action because of file size. Anyway, everything is working great. I definitely think the TimelineLite approach is an improvement over TweenGroup.
One more thing I noticed. If I put a 0 duration time in the onComplete is only called once, or not at all. But if I put a 0.1 duration in then it is always called...