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

Naming Instances

Instantiation of a Movie Clip object involves two steps: placing an instance on the Stage and naming that instance in the Property Inspector. You follow the same steps to instantiate a Button object and, as you’ll learn in Chapter 10, a TextField object. These two steps accomplish the same task that the constructor function performs for other Flash objects (Figure 5.2). The result is the same; a named object is created from a class. You can use that object by calling its methods or evaluating its properties.

Figure 5.2. Instantiation of a movie-clip symbol (called myCircle) versus instantiation of a Date object (called myDate).



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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