Defining the class for a collection item

You code the properties for a collection item in a separate ActionScript class, which you define as follows:

The following is a simple example of a collection item class file called CompactDisc.as.

class CompactDisc{
   [Inspectable(type="String", defaultValue="Title")]
   var title:String;
   [Inspectable(type="String", defaultValue="Artist")]   
   var artist:String; 
}

To view the CompactDisc.as class file, see Simple collection example.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00002530.html