If you don't want the movie clip to load before the first frame, deselect the Export in First
7.
Frame option.
If you deselect this option, place an instance of the movie clip on the frame of the Timeline
where you want it to be available. For example, if the script you're writing doesn't reference the
movie clip until Frame 10, then place an instance of the symbol at or before Frame 10 on
the Timeline.
Click OK.
8.
After you've assigned a linkage identifier to a movie clip, you can attach an instance of the symbol
to the Stage at runtime by using
To attach a movie clip to another movie clip:
Assign a linkage identifier to a movie clip library symbol, as described in the previous example.
1.
With the Actions panel open (Window > Development Panels > Actions), select a frame in
2.
the Timeline.
In the Actions panel's Script pane, type the name of the movie clip or level to which you want
3.
to attach the new movie clip. For example, to attach the movie clip to the root Timeline,
type this.
In the Actions toolbox (at the left of the Actions panel), click Built-in Classes > Movie >
4.
MovieClip > Methods, and select
Using the code hints that appear as a guide, enter values for the following parameters:
5.
For
idName
For
newName
For
, enter the level at which the duplicate movie clip will be attached to the movie
depth
clip. Each attached movie clip has its own stacking order, with level 0 as the level of the
originating movie clip. Attached movie clips are always on top of the original movie clip, as
shown in the following example:
this.attachMovie("calif_id", "california_mc", 10);
For more information, see
Adding parameters to dynamically created movie clips
When you create or duplicate a movie clip dynamically using
MovieClip.duplicateMovie()
object. The
initObject
dynamically created movie clips to receive clip parameters.
For more information, see
MovieClip.duplicateMovieClip()
attachMovie()
attachMovie()
, specify the identifier you entered in the Linkage Properties dialog box.
, enter an instance name for the attached clip so that you can target it.
MovieClip.attachMovie()
, you can populate the movie clip with parameters from another
parameter of
attachMovie()
MovieClip.attachMovie()
in Flash ActionScript Language Reference.
.
.
in Flash ActionScript Language Reference.
MovieClip.attachMovie()
and
duplicateMovie()
and
Adding parameters to dynamically created movie clips
and
allows
213
Need help?
Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?