Built-In Classes

 <  Day Day Up  >  

In ActionScript 2.0, as with other object-oriented languages, you have built-in classes available. In Flash, the most common built-in class (and a foundation object within Flash) is the MovieClip class.

In Flash, a MovieClip object has many predefined methods and properties that enable you to easily build rich user interfaces. Although this text does not cover many of the animation and user interface (UI) features of the movie clip, it is important to note that code often builds on the existing foundation of the MovieClip class. This is done using inheritance, as discussed in Chapter 5, "The Meek Shall Inherit the Earth."

Note that components are built-in classes with a specific purpose. They are easy to use in Flash because they have exposed properties and methods. By investigating the Components panel in Figure 2.8, you might notice the many common UI and data components that are often needed when building applications. The Component Inspector enables you to view exposed members .

Figure 2.8. Available components in Flash.

graphics/02fig08.gif

N OTE

Components are covered in more detail in Chapter 9, "Building and Using UI Components."


You have many tools, such as components, at your disposal. In Flash, you can create your own custom solutions or build hybrid solutions using prebuilt and tested components to augment custom solutions. The following list identifies the benefits of using prebuilt components:

  • Abstraction and reduced complexity. The assembler doesn't need to know how individual objects are built to be able to use them.

  • Flexibility and maintainability. Individual objects can be replaced without rebuilding the entire system.

  • Quality and performance. Objects are developed by domain experts.

  • Individual objects. These are pretested for quality and performance.

 <  Day Day Up  >  


Object-Oriented Programming with ActionScript 2.0
Object-Oriented Programming with ActionScript 2.0
ISBN: 0735713804
EAN: 2147483647
Year: 2004
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net