Load external in Flash. Method of SWF file

Source: Internet
Author: User

One, Loadmovie ("url", Target [, Method])
Description: function; Loads the SWF file or JPEG file into the path of the target movie clip in Flash player while playing the original SWF file.
First we can see that the function has 3 parameters: URL, Target, method. Where the last parameter "method" is an optional parameter.
1. Parameter URL: The absolute or relative URL (path) of the SWF file or JPEG file to be loaded.
This means that the URL can be a local file path, or it can be a file address on the Internet. However, you can only be a SWF or JPEG file, regardless of where you load it. Also, the parameter is a string, so it must be written in a half-width double quote, such as: Loadmovie ("01.swf", _root)
Loadmovie ("01.jpg", _root)
Loadmovie ("http://www.abc.com/01.swf", _root)
Loadmovie ("Http://www.abc.com/01.jpg", _root)


2. Parameter target: The path to the target movie clip. The target movie clip will be replaced with a loaded SWF file or image.
This parameter represents the path to which the movie will be loaded, and it points to the path of the target movie clip. When loaded, the target movie clip is replaced with a loaded SWF file or image. such as: Loadmovie ("01.swf", _root)
Loadmovie ("01.swf", _root.loading)
Loadmovie ("01.swf", _root.loading.01)
Loadmovie ("02.swf", _root. aa);
_root. Aa. _x = 50;
_root. Aa. _y = 100;

Second, loadmovienum ("url", level [, variables])
Description: A function that loads a SWF file or a JPEG file to a level in Flash player while playing a previously loaded SWF file.
First we can see that the function has 3 parameters: URL, target, variables. Where the last parameter "variables" is an optional parameter.
1. Parameter URL: The absolute or relative URL (path) of the SWF file or JPEG file to be loaded.
This parameter of the function is identical to the usage of this parameter in Loadmovie above, and is no longer explained here.
2. Parameter level: An integer that specifies which levels of the SWF file will be loaded into Flash Player.
When loading, this can be written: Loadmovienum ("01.swf", 1);
Loadmovienum ("01.swf", 2);
Loadmovienum ("01.swf", 3);

Control, you can use this: _level1._x=10;
_level2.aa._alpha=50;
_level3.aa.bb._width=110;


It should be noted that each level can only have one SWF or JPEG file at a time. If two SWF or JPEG files have the same level, the latter replaces the former. Different levels of _level, the level of large will be covered by the small, that is: the number of large will be in the number of small.

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.