Step 5: Manually Install and Test the Component
You're now done with the absolute basics and can test your work. To do this you need to install the component in the Components panel and try it out.
|Figure 5. Roll over: After manual installation you should be able to see your component in the Components palette. If you added a tool tip string, you should also be able to see a tool tip when you roll over your component with your mouse.|
First, select the component in the Library and go back to the "Component Definition..." window. Enable "Display in Components Panel" checkbox. Here, you can add a brief tool tip that will display when you roll over the component's icon in the Components panel. Next, click on the "Live Preview" Set button and switch to the embedded option. I left this file external throughout the testing phase for convenience. However, changing it to embedded will help reduce any possible problem of lost or incorrect pathnames when moving or copying the file on your drive.
Finally, quit Flash, copy the FLA file (not the SWF) to the Flash Configuration folder for your operating system, and place it in the "Components" directory:
For Windows operating systems:
Windows 2000 or XP: C:\Documents and Settings\user\Application Data\Macromedia\Flash MX\Configuration\Components
Windows 98 or ME: C:\Windows\Application Data\Macromedia\Flash MX\Configuration\Components
Windows NT: Windows directory\profiles\user\Application Data\Macromedia\Flash MX\Configuration\Components
For Macintosh operating systems:
Macintosh OS X: Hard Drive/Users/Library/Application Support/Macromedia/FlashMX/Configuration/Components
Macintosh System 9.x, single user: Hard Drive/System folder/Application Support/Macromedia/FlashMX/Configuration/Components
Macintosh System 9.x, multiple users: Hard Drive/Users/user/ Documents/Macromedia/FlashMX/Configuration/Components
Now you can restart Flash and your component should be in the Components panel (see Figure 5). When you roll over it you should see the tool tip you provided. Drag it to the stage and configure its lone property. Because of the Live Preview, the stage version should update immediately, without having to test your movie.
Coming up Next …
In part two of this article, coming in February, I'll show you how to make a custom interface for the Component Properties panel, how to add some new ActionScript to make your component more robust and easy to use, and how to add help and usage notes to Flash's Reference and Action panels. You'll even learn how to package your component for error-free distribution via the Macromedia Extension Manager.