Using ActionScript 2.0 Components |
|
|
|
| Collection Properties > 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:
get and set (getter/setter) methods.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.
|
|
|
|