Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Classes > Assigning a class to symbols in Flash | |||
You can also assign a class to symbols that you might use in a Flash file, such as a movie clip object on the Stage.
class Animal {
public function Animal() {
trace("Animal::constructor");
}
}
This ActionScript creates a new class called Animal that has a constructor method that traces a string to the Output panel.
The Advanced button is available when you are in the basic mode of the Create New Symbol dialog box.
Enabling this option allows you to dynamically attach instances of this symbol to your Flash documents during runtime.
The Output panel displays the text from your Animal class's constructor function.
|
NOTE |
|
If you need to modify the Movie Clip's Linkage properties, you can right-click the symbol in the document's library and select Properties or Linkage from the context menu. |
Flash CS3