Detailed instructions for use are in the User's Guide.
[. . . ] Learning Flash
Trademarks Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware, Authorware Star, Backstage, Bright Tiger, Clustercats, ColdFusion, Contribute, Design In Motion, Director, Dream Templates, Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Flash Lite, Flex, Fontographer, FreeHand, Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Knowledge Track, LikeMinds, Lingo, Live Effects, MacRecorder Logo and Design, Macromedia, Macromedia Action!, Macromedia Breeze, Macromedia Flash, Macromedia M Logo and Design, Macromedia Spectra, Macromedia xRes Logo and Design, MacroModel, Made with Macromedia, Made with Macromedia Logo and Design, MAGIC Logo and Design, Mediamaker, Movie Critic, Open Sesame!, Roundtrip, Roundtrip HTML, Shockwave, Sitespring, SoundEdit, Titlemaker, UltraDev, Web Design 101, what the web can be, and Xtra are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. [. . . ] For a lesson about button symbols, select Help > How Do I > Basic Flash > Add Animation and Navigation to Buttons.
Create a graphic symbol
A graphic symbol is well suited for repeated use of static images, or for creating animations associated with the main Timeline. Unlike with movie clip and button symbols, you cannot give instance names to graphic symbols, nor can you refer to them in ActionScript. You'll take vector art on the Stage and turn it into a graphic symbol.
1. In the Tools panel, click the Selection tool. On the Stage, drag around the car to select it.
3. In the Convert to Symbol dialog box, enter CarGraphic as the name and select Graphic as
the behavior.
5. The Registration grid uses a small black square to indicate where, within the symbol bounding
box, the registration point is located. A registration point is the axis around which the symbol rotates, and the point along which the symbol aligns. Click the upper left square on the grid to select the registration point location, and click OK.
6. The car on the Stage is now an instance of the CarGraphic symbol. The Property inspector
shows properties for the graphic symbol instance.
7. Open the Library panel (Window > Library) to view the symbol.
You'll find the CarGraphic symbol in the Library panel. Each document has its own library, and you can share libraries between different FLA files.
64
Chapter 8: Create Symbols and Instances
Duplicate and modify an instance of a symbol
Once you've created a symbol, you can use instances of it repeatedly in your document. You can modify the following instance properties for an individual instance without affecting other instances or the original symbol: color, scale, rotation, alpha transparency, brightness, tint, height, width, and location. If you edit the symbol later, the instance retains its modified properties in addition to acquiring the symbol edits. You'll now duplicate the instance of the car, then change the tint for the duplicate.
1. Press Alt and drag the car up to create another instance.
2. With the duplicate selected, select Tint from the Color pop-up menu in the Property inspector. In the RGB area, enter 0 in the Red Color pop-up menu, 0 in the Green Color pop-up menu,
and 255 in the Blue Color pop-up menu. The duplicate instance turns blue, but the original instance remains unchanged.
Modify a symbol
You can enter symbol-editing mode by double-clicking any instance of a symbol. Changes that you make in symbol-editing mode affect all instances of the symbol.
1. Do one of the following to enter symbol-editing mode:
On the Stage, double-click one of the car instances. [. . . ] Trace the description property of pedals:
trace (pedals. getDescription ());
5. You should see the description of pedals in the Output panel.
Note: An example finished file of the document you just created, named handson2. fla, is located in your finished files folder. For the path, see "Set up your workspace" on page 113.
About extending existing classes
The extends keyword in ActionScript 2. 0 allows you to use all the methods and properties of an existing class in a new class. For example, if you wanted to define a class that inherited everything from the MovieClip class, you could use the following:
class Drag extends MovieClip {}
The Drag class now inherits all properties and methods from the existing MovieClip class, and you can use MovieClip properties and methods anywhere within the class definition, as in the following example:
Note: The following ActionScript is an example only. [. . . ]