Unless you specifically target symbols in the Library with linkage settings, instances of movie clip symbols in an Adobe Flash Professional document's Library cannot be programmatically accessed or created using ActionScript. When you publish a SWF file, any symbols in the Library that are never used on the Stage are not included—which is helpful because you don't need to comb through the Library and delete unused symbols and graphics to reduce the SWF's file size. Only the symbols that are used are exported.
However, this means that if you want to make a symbol available in the SWF for ActionScript to access at runtime, you must specify that the symbol should be exported for ActionScript.
Follow these steps to enable the Export for ActionScript setting:
By default, the Class field is populated with the symbol name (edited to remove any spaces). To specify that the symbol should use a custom class for its behavior, enter the full name of the class in this field, including its package. If you want to be able to create instances of the symbol in ActionScript, but don't need to add any behavior, you can leave the default class name that Flash assigns.
The Base Class field's value defaults to flash.display.MovieClip. If you want your symbol to extend the functionality of another customer class, you can specify that class's name instead—as long as that class extends either the Sprite or MovieClip class.
A warning is displayed if Flash cannot find an external ActionScript file with a definition for the specified class: "A definition for this class could not be found in the classpath, so one will be automatically generated in the SWF file upon export." Disregard this warning if the symbol does not require unique functionality beyond the functionality inherited by the MovieClip class. Otherwise, enter the correct classpath that matches the ActionScript file (.as file) you are using.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
Flash User Forum |
More |
| 04/23/2012 | Auto-Save and Auto-Recovery |
|---|---|
| 04/23/2012 | Open hyperlinks in new window/tab/pop-up ? |
| 04/21/2012 | PNG transparencies glitched |
| 04/01/2010 | Workaround for JSFL shape selection bug? |
Flash Cookbooks |
More |
| 02/13/2012 | Randomize an array |
|---|---|
| 02/11/2012 | How to create a Facebook fan page with Flash |
| 02/08/2012 | Digital Clock |
| 01/18/2012 | Recording webcam video & audio in a flv file on local drive |