User Guide

882 Chapter 6: Components Dictionary
The following example demonstrates how to create a new movie clip symbol to use as the title
background.
To set the title of an Window 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 will be automatically filled out with TitleBackground.
7.
Set the AS 2.0 class to mx.skins.SkinElement.
SkinElement is a simple class that can be used for all skin elements that dont provide their own
ActionScript impelmentation. It provides movement and sizing functionality required by the
version 2 component framework.
8.
Ensure that Export in First Frame is already selected, and click OK.
9.
Open the new symbol for editing.
10.
Use the drawing tools to create a box with a red fill and black line.
11.
Set the border style to hairline.
12.
Set the box, including the border, so that it is positioned at (0,0) and has a width of 100 and
height of 22.
The Window component will set the proper width of the skin as needed but it will use the
existing height as the height of the title.
13.
Click the Back button to return to the main Timeline.
14.
Drag the Window component to the Stage.
15.
Select Control > Test Movie.
Window class
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView > Window
ActionScript Class Name mx.containers.Window
The properties of the Window class let you do the following at runtime: set the title caption, add
a close button, and set the display content. Setting a property of the Window class with
ActionScript overrides the parameter of the same name set in the Property inspector or
Component Inspector panel.
skinCloseDisabled
The close button in its disabled state. The default value is
CloseButtonDisabled.
skinCloseOver
The close button in its over state. The default value is
CloseButtonOver.
Property Description