![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
To create an instance of an ActionScript class, use the new
operator to invoke the class's constructor function. The constructor function always has the same name as the class, and returns an instance of the class, which you typically assign to a variable.
For example, the following code creates a new Sound object.
var song:Sound= new Sound();
In some cases, you don't need to create an instance of a class to use it. For more information, see About class (static) members.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |