MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 956

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Adding an icon
You can add an icon that represents your component in the Components panel of the Flash
authoring environment.
To add an icon for your component:
Create a new image.
1.
The image must measure 18 pixels square, and you must save it in PNG format. It must be 8-
bit with alpha transparency, and the upper left pixel must be transparent to support masking.
Add the following definition to your component's ActionScript class file before the
2.
class definition:
[IconFile("component_name.png")]
Add the image to the same directory as the FLA file. When you export the SWC file, Flash
3.
includes the image at the root level of the archive.
Adding a tooltip
Tooltips appear when a user rolls the mouse over your component name or icon in the
Components panel of the Flash authoring environment.
You can define a tooltip in the Component Definition dialog box. You can access this dialog box
from the Library options menu of the component's FLA file.
To add a tooltip in the Component Definition dialog box:
Open the Component Definition dialog box.
1.
Select the Display in Components Panel option.
2.
Enter the text of your tooltip in the Tool Tip Text text box.
3.
Component development checklist
When you design a component, use the following practices:
Keep the file size as small as possible.
Make your component as reusable as possible by generalizing functionality.
Use the RectBorder class (mx.skins.halo.RectBorder) rather than graphical elements to draw
borders around objects. (See
Use tag-based skinning.
Define the
symbolName
Assume an initial state. Because style properties are now on the object, you can set initial
settings for styles and properties so your initialization code does not have to set them when the
object is constructed, unless the user overrides the default state.
956
Chapter 7: Creating Components
"RectBorder class" on page
,
, and
symbolOwner
className
647.)
variables.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents