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

Chapter 23. OBJECT-ORIENTED PROGRAMMING > CREATING OBJECT PROPERTIES

CREATING OBJECT PROPERTIES

So far, you have created a simple object that beeps if you send it the hello message. This object isn't terribly useful, however. To add greater functionality to an object, it needs more than methods. The minimal object is missing the second component of truly functional objects in Director: properties. The property variables of an object can be used to hold any type of data and are unique to each instance of the object.

You declare an object's property variables at the top of the parent script in the same manner as you declare globals and properties in behaviors:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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