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

Chapter 6. ActionScript for Effects > Understanding Objects

Understanding Objects

Flash bases its framework on a model involving classes, instances, and objects. In this section, you take a look at what these things are and how they affect you when you create your documents. A class is a collection of methods and properties that you use to describe an object. For example, you might have a Soda class. This particular class might have some methods and properties that help describe the Soda class. A property might be isDiet, packageType, or hasCaffeine. Methods of this class might be doDrink(), setFlavor(), getVolume(), or getBrand(). The class is like a blueprint that describes soda, and you might have several different kinds of carbonated beverages described by this single class.

You cannot create classes directly in the Actions panel. Classes must be created as external files (such as in the Script window) that you save. The files compile into the SWF file when you publish the file. You won't create any classes for this book, but you do use what are called “built-in classes” that are included right in ActionScript itself.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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