• 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 the Button class and, as you’ll learn in Chapter 10, the TextField class. These two steps accomplish the same task that the constructor function performs for other Flash classes (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_mc) 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