Because the number needs to not be random, but correspond with the item being tweened - I guess I could keep a counter and create an array of Y locations and return those, but I went ahead and just used a Timer with TweenMax.to() and a counter I incremented... works fine, I was just hoping it could be done easily with allTo() and not having to write a bunch of extra code - ;
So yeah, good suggestions though, thanks! I didn't realize the property could be a function as well - great idea. I might try and use that if I get sick of the Timer class way. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Nathan Mynarcik Sent: Thursday, September 09, 2010 3:21 PM To: Flash Coders List Subject: Re: [Flashcoders] TweenMax.allTo() What if you did it like this: function getRandY():Number{ var randY:Number = Math.random()*stage.stageHeight; return randY; } TweenMax.allTo(_blockViews, 1, { alpha:1, y:getRandY() }, .2); Nathan Mynarcik [email protected] 254.749.2525 www.mynarcik.com On Thu, Sep 9, 2010 at 2:43 PM, Merrill, Jason < [email protected]> wrote: > So in Greensock's TweenMax, you can tween and stagger (delay) the > tweens of multiple sprites at once, via giving a method like, "allTo" > an array of objects (in this example, _blockViews): > > TweenMax.allTo(_blockViews, 1, { alpha:1, y:150 }, .2); > > However, this assumes you want all the tweens to tween to the same > property value. What if I wanted all the objects to end up at various > Y locations instead of 150? As it is in the code above, they all > tween to y=150. Is there a way to provide an array of y locations > that each object moves to and have then staggered (as you can with the > allTo() method)? > > I can of course accomplish this by writing some Timer event code to > tween each object individually and accomplish what I want - ending up > at varying Y locations, but I'd rather not have to write all that code > - shouldn't there be a way to do this with TweenMax's sequencing > capabilities? Would this be a case where you would use TimelineMax and > append several tweens? If so, how would you also stagger them? > > > > Jason Merrill > > Instructional Technology Architect > Bank of America Global Learning > > Join the Bank of America Flash Platform Community > <http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx> and > visit our Instructional Technology Design Blog > <http://sharepoint.bankofamerica.com/sites/SDTeam/itdblog/default.aspx > > > (Note: these resources are only available for Bank of America > associates) > > > > > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

