Flash CS3 Documentation |
|||
| Getting Started with Flash Lite 2.x > Tutorial: Creating a Flash Lite Application > Create the application > Create the specials screen > Create the image animation | |||
In this section, you'll create the tweened animation that transitions between images of each special. When you've completed this section, the animation plays through without stopping. Later in the tutorial, you'll add navigation and ActionScript that lets the user control the animation with the device's right soft key.
To create the animation, you'll use a prebuilt movie clip that contains images of all of the specials arranged in a vertical column. You'll use a masking layer to make only one of the images visible. Then you'll create a series of tweens that move the movie clip upward, so that a different image is visible. The last image in the movie clip is a duplicate of the first one, so that the animation sequence can return to its initial state after the user views the final image. These concepts are illustrated in the following example:
In the last section of the tutorial, you'll add ActionScript and user interface elements that let the user control the animation sequence.
The rest of this tutorial refers to this movie clip simply as the Images movie clip.
This aligns the upper-left corner of the images movie clip with the upper-left corner of the Stage.
This moves the movie clip upward on the Stage 100 pixels.
This tweens the Images movie clip's position between the keyframes in Frames 10 and 20.
It doesn't matter what fill color you use for the rectangle, but it must be completely opaque.
The layer is converted to a mask layer, indicated by a mask layer icon. The layer immediately below it is linked to the mask layer, and its contents show through the filled area on the mask. For more information about working with mask layers in Flash, see the mask laters sections in Using Flash.
At this point, if you were to test the application in the emulator, the animation you created would play through to the end and then stop. In Add navigation and text to the specials screen, you'll add ActionScript that stops the animation at each keyframe, as well as user interface elements that let the user navigate between images.
Flash CS3