Table of Contents

14.1 Creating the Library Symbol

Before returning to the code in Example 14-1, let's set up our movie's assets. Each movie clip subclass is associated with a movie clip symbol stored in the Library. To create instances of the subclass programmatically, we must export the symbol for use with ActionScript. Here are the steps we follow to create and export a movie clip symbol for our Ball class:

  1. Create a movie clip symbol, named ballSymbol, that contains a circle shape.

  2. In the Library, select ballSymbol.

  3. From the Library's pop-up Options menu, select Linkage. The Linkage Properties dialog box appears.

  4. Select the Export For ActionScript checkbox.

  5. In the Identifier field, type ballSymbol.

  6. Click OK.

Next, we'll create the Ball constructor function that will be invoked automatically every time an instance of ballSymbol is created.


Table of Contents