This user is yet to take control of their account and provide a biography. If you are the author of this article, please contact us via support AT actionscript DOT org.
someMCInstanceName is the path to a timeline into which we wish to place a copy of the library clip. In our example we have a Movie Clip (MC_main) with an instance name "main".
idName is the linkage name of the movie in the library to attach. The linkage name is the name entered in the Identifier field in the Symbol Linkage Properties dialog box.
![]() | In Flash 5 1) Open the Library window The process is the same for Flash MX however Flash MX allows you to enable or disable (via the checkbox) loading the movieclip before the first frame. How linkage works Linkage allows you to attach and use movieclips from the library at run time, but because Flash doesn't know when you're going to ask for a copy, it loads linked items before anything else to ensure they are available as soon as the movie starts playing. This can cause troubles when using a preloader as all linked content in the library will be loaded even before your preloader. In Flash MX you can disable this function by unchecking the 'Export in First Frame' option, however to ensure Flash loads the movieclip, you must physically place it somewhere in the SWF. Flash will load the clip when it reaches the frame you place it on, so it will only be available from that frame onwards. In Flash 5 this option is not supported. One good way to preload SWFs which make extensive use of linkage is to use an external 'wrapper' SWF, whose sole purpose is to load in your SWF. If you want to do that, try this external SWF preloader script by Jesse. |
newname A unique instance name for the movie clip being attached.
depth An integer specifying the depth level where the movie is placed. Note that depth and levels in Flash are two separate concepts, so don't get them confused.
Let's attach a movieclip from a button:
button1
button2
[as]on (release) {button3
[as]on (release) {