Flash assigns a class to the movie clip symbol code

Source: Internet
Author: User


In Flash, select File > New, select Flash document from the list of file types, and then click OK.
Use the Ellipse tool to draw a circle on the stage.
Select the drawn circle and choose Modify > Convert to symbol.


In the Convert to Symbol dialog box, select movie clips as the behavior of the symbol and enter BALL_MC in the Name text box.
Select advanced to display these options if the linked options are not already displayed.
Select the Export for ActionScript option, and then type MoveRight in the class text box. Click OK.
Save the file as a ball.fla in the Balltest directory (the same directory that contains the moveright.as file).
Test the Flash document (Control > Test Movie).
Each time a single hit movie clip, it moves 20 pixels to the right.

If you create a component property for a class, and you want movie clips to inherit these component properties, you also need to do one step: Select the movie clip symbol in the library panel, select component definition from the Library pop-up menu, and then enter the new class name in the Class box.

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.