Shared symbols cannot be instanced using attachMovie or attachSound
Issue
Symbols imported from a shared library cannot be instanced using the MovieClip.attachMovie orSound.attachSound methods.
Reason
The attachMovie and attachSound methods are used to create an instance of a Library symbol whose Linkage has been set to Export this Symbol in the Symbol Linkage Properties dialog. An imported symbol's Linkage is set, by default, to Import this Symbol from URL.
Put another way, an imported (shared) symbol cannot also be exported for use with either theattachSound orattachMovie methods.
Solution
Instances of imported symbols must be manually placed on the Timeline during authoring. Use ActionScript to set the instance's properties, such as _visibility, if you want to have programmatic control over when it appears and disappears from the stage. Only use attachSound andattachMovie to create instances of exported symbols residing in the current movie's Library.
Additional information
See Using shared libraries (TechNote 14767) for more information about setting the Linkage property of a Library item and using shared libraries in general. Also see the listings for MovieClip.attachMovie and Sound.attachSound in the ActionScript dictionary.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
