An Alert component uses the following skin properties to dynamically skin the buttons and
title bar:
Property
buttonUp
buttonUpEmphasized
buttonDown
buttonDownEmphasized
buttonOver
buttonOverEmphasized
titleBackground
To set the title of an Alert component to a custom movie clip symbol:
1.
Create a new FLA file.
2.
Create a new symbol by selecting Insert > New Symbol.
3.
Set the name to
TitleBackground
4.
If the advanced view is not displayed, click the Advanced button.
5.
Select Export for ActionScript.
6.
The identifier is automatically filled out with
7.
Set the AS 2.0 class to
SkinElement is a simple class that can be used for all skin elements that don't provide their
own ActionScript implementation. It provides movement and sizing functionality for
components of version 2 of the Macromedia Component Architecture.
8.
Make sure that Export in First Frame is already selected.
9.
Click OK.
10.
Open the new symbol for editing.
11.
Use the drawing tools to create a box with a red fill and black line.
12.
Set the border style to hairline.
13.
Set the box, including the border, so that is positioned at (0,0) and has a width of 100 and
height of 22.
The Alert component sets the proper width of the skin as needed, but it uses the existing
height as the height of the title.
14.
Click the Back button to return to the main timeline.
70
Alert component (Flash Professional only)
Description
The up state of the buttons.
The up state of the default button.
The pressed state of the buttons.
The pressed state of the default button.
The rolled-over state of the buttons.
The rolled-over state of the default
button.
The window title bar.
.
mx.skins.SkinElement
Default value
ButtonSkin
ButtonSkin
ButtonSkin
ButtonSkin
ButtonSkin
ButtonSkin
TitleBackground
.
TitleBackground
.
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers