Loading SWF files in Flash

Source: Internet
Author: User

1.ctrl+f8 new [movie clips], name free, drag the movie symbol to the top left corner of the scene (shortcut key definition location: ctrl+alt+1 and Ctrl+alt+4)

2. Click the movie symbol in the scene of the mouse, define the instance name in its property bar (CTRL+F3), example: MC

3. Enter the following code (F9) on the frame where the SWF file needs to be loaded:

--------------------------------------

Loadmovie ("zb.swf", MC);

ZB.SWF is the path name of the loaded file, and the MC is the movie symbol instance name (note case)
Onenterframe = function () {
if (mc._width!= 0) {
mc._x = 0;
mc._y = 0;

Control where the MC file is loaded in the scene
Delete Onenterframe;

Delete Onenterframe Recycle resource
}
};

--------------------------------------

4.ctrl+enter Run Movie

Note: The MC name in Loadmovie must be the same as the movie symbol instance name

In addition, if you insert a swf-a file into a Web page, and the other Swf-b file is loaded in this swf-a, the path in Loadmovie is to load the Swf-a file with the Swf-b file path that the page inserts, not swf-a the local location and load the Swf-b file path

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.