I believe you have used Attachmovie this statement, you can easily bind the library with linkage output elements, in some games and more interactive sites are often used. So here is a problem, if I in the SUB.FLA library with linkage set a few elements, and then want to attachmovie these elements inside the MAIN.FLA, how to deal with Nepal?
The first method , Main.fla use of Loadmovie (); or Loadmovienum (), import the sub.swf first, and then use Attachmovie to bind the elements after the import is complete. However, the use of this method is greatly limited by the use of Attachmovie only on the layer where the Loadmovienum () statement is imported, or on the MC where the Loadmovie () statement is imported, for example:
Loadmovienum ("sub.swf", 1);
_level1.attachmovie ("CC", "CC1", 5);
is effective.
Loadmovienum ("sub.swf", 1);
_level0.attachmovie ("CC", "CC1", 5);
It's not valid.
Same:
Loadmovie ("sub.swf", "abc");
_root.abc.attachmovie ("CC", "CC2", 50);
is effective.
Loadmovie ("sub.swf", "abc");
_root.attachmovie ("CC", "CC2", 50);
It's not valid.
The second method , using the export for runtime sharing method, is as follows:
In Sub.fla, set the linkage value for the attach element and select Export for ActionScript and export in the
Then, create an empty MC in Sub.fla, set the linkage value of this empty MC to ext in the library, select Export in first frame and export for runtime sharing, and the URL is filled in as SUB.SW F as Pictured:
In Main.fla, create a new empty MC, set the linkage value of this empty MC in the library as ext, then select Import for Runtime sharing, and the URL one to fill in the sub.swf as shown:
Then in Main.fla, and then a new MC, from the Library to the ext this empty MC Drag and drop to the new MC, and then the new MC arbitrarily set a linkage value, and then select Export for ActionScript and export in The two items in the second frame.
Do the above two steps, you can in Main.fla inside any attach sub.fla inside of the available elements, such as:
Attachmovie ("CC", "CC", 1);
Attachmovie ("Bar", "Bar", 2);
The third method , although the second method is already very ideal, but there is a limit, that is, must edit SUB.FLA, add ext This empty MC, then there is no way to go around, Can not need to change sub.fla, directly in Main.fla inside the fuss? The third practical approach is described below:
Assuming that we have a tt.swf this file, which contains the three available elements of linkage as a,b,c in the library, you can use the following method without modifying the TT.FLA, directly attach the three elements in the tt.swf
We open the Master file Mm.fla, create a new empty MC, and then set the linkage value in the library as a (or B or C, as long as you keep the same name as a linage value inside tt.swf), and then select Import for runtime sharing, URL one entry for tt.swf, as shown in figure:
Then in the Mm.fla, and then a new MC, from the library to the just a This empty MC drag and drop into the new MC, and then the new MC arbitrarily set a linkage value, and then select Export for ActionScript and export in the Frame these two items.
You can then attach any of the available elements in the Tt.fla inside the MM.FLA, such as:
_root.attachmovie ("C", "C", 1);
_root.attachmovie ("A", "a", 11);
_root.attachmovie ("B", "B", 111);
The second and third methods of this tutorial provide source download and are interested to download (note source file is Flash8 format)