The beauty of a nested tween in Flash
Nested tweens seem really complicated, but once mastered they can be extremely helpful. Today I’m going to show you how to make a bouncing ball that also moves across the screen. The across the screen motion will be a motion tween on our main timeline and the bouncing will be a motion tween nested in our symbol.
First create an object or select the one you want to use. Right click and choose Covert to Symbol.
Name your symbol and click Okay. Right click again and choose Create Motion Tween. In your timeline, make the motion tween as long as you want your motion to be. Keep in mind that your timeline is measured in frames, not seconds. Therefore. to have a 3 second motion (with my frames per second set at 30), my motion tween will be 90 seconds long. At frame 1, make your symbol off the stage to the left and at 90 seconds, make your symbol off the stage to the right. If you test your movie, the ball in moving in across the stage. However, we want this ball to bounce as well.
Right click again, convert your object to a symbol (this time name it something like bouncingBall) and create motion tween. Halfway in your motion tween timeline, move the ball as high as you’d like your bounce to be. Remember that the shorter your nested tween timeline is, the more times the ball will bounce across the screen.
Test your movie to see your ball move across your stage as well as up and down.