• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Getting a Handle on ActionScript > About Methods and Properties

About Methods and Properties

Each object of a class (for example, Zeke of the humans) is different from the others in its class by more than just its name. Each person differs because of several characteristics that define the individual such as height, weight, sex, and hair color. In object-oriented scripting, we say that objects and classes have properties. Height, weight, sex, and hair color are all properties of the human class (Figure 3.3). In Flash, each class has a predefined set of properties that let you establish the uniqueness of the object. The String class has just one property called length, which is a measure of how many characters there are in the object. The MovieClip class, on the other hand, has many properties, such as _height, _width, and _rotation, which are measures of the dimensions and orientation of a particular movie-clip object. By defining and changing the properties of objects, you control what each object is like and how each object differs from the others.

Figure 3.3. Adam, Betty, and Zeke are human objects with different properties. Properties differentiate objects of the same class.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint