Create a new Flash document.
Adjusts the stage size of the document to 100 pixels multiplied by 100 pixels.
Draw a red square on the stage using the Rectangle tool.
Adjust the square size to 80 pixels by 80 pixels by using the property inspector, and then move the shape to the center of the stage.
Select Frame 20th on the timeline, and then press F7 (Windows or Macintosh) to insert a new empty keyframe.
Use the Ellipse tool to draw a blue circle at frame 20th on the stage.
Adjust the circle size to 80 pixels by 80 pixels by using the property inspector, and then move it to the center of the stage.
Click the blank frame between frames 1th and 20th and set the tween type to shape in the property inspector.
Save the current document as a ANIMATION.FLA.
Select Control > Test movie to preview the animation.
The SWF file is created in the same directory as the FLA. In order for this exercise to work correctly, you need to generate a SWF file to load it into a separate FLA file.
Create a new FLA file and save it as a animationholder.fla.
Save the file in the same folder as the Animation.fla file you created above.
Add the following ActionScript code to the first frame of the main timeline:
The code is as follows |
Copy Code |
This.createtextfield ("Textfield_txt", 10, 0, 0, 300, 200); Textfield_txt.html = true; Textfield_txt.htmltext = "Here's" an interesting animation: ';
|
In this example, the fully qualified path to the new movie clip is TEXTFIELD_TXT.ANIMATION_MC.
Save the changes to the Flash document, and then select Control > Test movie to preview the animation in the text field.