Using ActionScript 3.0 Components |
|
|
|
| Working with Components > Component architecture > The ActionScript 3.0 Components API | |||
Each ActionScript 3.0 component is built on an ActionScript 3.0 class that is located in a package folder and has a name of the format fl.packagename.classname. The Button component, for example, is an instance of the Button class and has a package name of fl.controls.Button. You must reference the package name when you import a component class in your application. You would import the Button class with the following statement:
import fl.controls.Button;
For more information about the location of component class files, see Working with component files.
A component's class defines the methods, properties, events, and styles that enable you to interact with it in your application. The ActionScript 3.0 UI components are subclasses of the Sprite and UIComponent classes and inherit properties, methods, and events from them. The Sprite class is the basic display list building block and is similar to a MovieClip but does not have a Timeline. The UIComponent class is the base class for all visual components, both interactive and non-interactive. The inheritance path of each component, as well as its properties, methods, events, and styles are described in the ActionScript 3.0 Language and Components Reference.
All ActionScript 3.0 components use the ActionScript 3.0 event handling model. For more information on event handling, see Handling events and Programming ActionScript 3.0.
|
|
|
|