Flash the SWF code embedded in this field

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.