soupking Posted March 16, 2011 Share Posted March 16, 2011 Is there a way to ease the total stagger of AllTo? I know it's possible to ease each individual tween within, but is the entire array tween 'easable' in it's entire whole somehow? Link to comment Share on other sites More sharing options...
Carl Posted March 17, 2011 Share Posted March 17, 2011 yes, you can put the allTo into a TimelineLite and then ease the currentProgress of the timeline: var mcs_array:Array = [put a bunch of mcs here]; var tl:TimelineLite = new TimelineLite({paused:true}); //append allTo to timeline tl.appendMultiple(TweenMax.allTo(mcs_array, 1, {y: 100}, .2)); //tween the timeline's currentProgress //experiment with durations and ease types in the next line TweenLite.to(tl, 5, {currentProgress:1, ease:Circ.easeIn}); you can get some really cool effects, try adding a bounce and the timeline will play and rewind in a bouncing motion. the code above will start the tweens in the timeline very slow and progressively get faster. this will progressively decrease the stagger amount and also make the playback of the tweens faster if you want the tweens to playback at their normal rate, but have the stagger amount decrease over time, then you can't do allTo, you'll have to do a loop like Zync suggests here: viewtopic.php?f=1&t=4589 Link to comment Share on other sites More sharing options...
soupking Posted March 17, 2011 Author Share Posted March 17, 2011 Wow, okay. heh, and I thought my studies were at a plateau. Goodness...Okay, I guess I'm going to learn about TimelineLite now. If you've seen my other post you'll know I'm retarded. Everybody's way up the mountain. I feel like a snowboarder still figuring out how to get my dang ski boot in binding. It's a bit late, so I'll probably work on this tomorrow. Thanks a bunch for the small snippet. That stuff is like gold to me. I'm a lot better at line-by-line to chew on rather than dissecting full ideas at a time. Peace, -soupking Link to comment Share on other sites More sharing options...
Carl Posted March 17, 2011 Share Posted March 17, 2011 i made a sample file for easing the timeline but forgot to attach it last night. take a peek Link to comment Share on other sites More sharing options...
jguthrie Posted March 18, 2011 Share Posted March 18, 2011 Thanks for those files. For some reason it isnt letting me use the array method to add to this tween. This works but would like to be able to do it with just one appendMultiple call... private var dancersTimeline:TimelineLite = new TimelineLite({paused:true}); dancersTimeline.insertMultiple(TweenMax.allTo(_peopleBig_arr, .2, { repeat: -1, yoyo:true, y:"-3" } )); dancersTimeline.insertMultiple(TweenMax.allTo(_peopleMed_arr, .2, { repeat: -1, yoyo:true, y:"-4" } )); dancersTimeline.insertMultiple(TweenMax.allTo(_peopleSma_arr, .2, { repeat: -1, yoyo:true, y:"-5" } )); dancersTimeline.insertMultiple(TweenMax.allTo(_peopleXsm_arr, .2, { repeat: -1, yoyo:true, y:"-5" } )); Link to comment Share on other sites More sharing options...
Carl Posted March 18, 2011 Share Posted March 18, 2011 Hi Jeff, appendMultiple and insertMultiple take in a single array of tweens plus an offset value. allTo creates an array of tweens. so once you use allTo inside an appendMultiple there is no room to add a bunch more tweens or arrays of tweens as they will be seen as additional parameters. There may be some way of creating a master array, populating it with the return values of an allTo, then pushing in additional tweens or arrays of tweens and then passing that master array into the timeline with one appendMultiple... but it wouldn't be worth the effort as just a few more appendMultiples would just do that for you, give you more control and be more readable. I don't think there is anyway to make the code you have any more streamlined, in fact I'd argue that those 4 lines do some pretty serious heavy lifting. hope this helps Carl Link to comment Share on other sites More sharing options...
jguthrie Posted March 18, 2011 Share Posted March 18, 2011 Ah ok. I was looking in the docs and there is this line: myTimeline.insertMultiple([new TweenLite(mc, 1, {y:"100"}), new TweenLite(mc2, 1, {x:120}), new TweenLite(mc3, 1, {alpha:0.5})], 0, TweenAlign.START, 0.2); http://www.greensock.com/as/docs/tween/ But i see now that each TweenLite is just tweening one movieclip... Probably cleaner to do it with the method I did above (well easier to read anyway) and it achieves what I want so I suppose it doesnt really matter Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now