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

Chapter 14. Movie Clip Subclasses and Co... > Creating and Invoking the Subclass C...

14.2. Creating and Invoking the Subclass Constructor

For now, our Ball constructor (from Example 14-1) is defined on the main timeline of our .fla file. Later, we'll see how to move the constructor to our ballSymbol Library symbol. The Ball constructor looks very much like the constructor functions we saw in Chapter 12, with the added feature that it is defined in a global namespace corresponding to the domain name, moock.org (your classes should be defined in your domain's namespace, as in com.yoursite.YourClass):

/*
 * Ball Class Constructor.
 */
org.moock.Ball = function ( ) {
  // Create Instance properties.
  // ...
  // Initialize instance.
  // ...
};


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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