I’ve been using TweenLite in a game that I’m creating and I’m sure there’s a better way of achieving what I’m doing right now.
When my game loads, there are lots of different movie clips just outside the stage so they cannot be seen. When the player clicks “start”, the first set of objects tweens onto the stage from the right, and off the stage on the left. The objects are destroyed when the player mouses over them, and I’ve been using setTimeout() to tell Flash when to bring the next set of objects on (just after the previous set).
Every single object has its own TweenLite.to(…) line and I have about 50+ objects, so I therefore have 50+ lines of code that say TweenLite.to(…) blah blah.
I thought about grouping each set of movie clips into one larger movie clip and having one TweenLite.to(…) line in the main timeline, but I’m not sure this is the best way to go it.
Also, is there a better way of telling Flash when to tween the next set of objects onto the screen? Because setTimeout() uses seconds, if the player’s computer slows down the objects end up being tweened on top of each other.
Any ideas?
Thanks in advance.