Frames 

 No Frames

Previous Element
KerningPair

Next Element
Layers


Layer

There are four possible states associated with a button : up, over, down, hit. This element specifies a single symbol that is defined when the Button is in any of the specified states. The 'hit' state defines the active area for the button within which mouse events are processed. In this case the bounds of the symbol are used to define the boundary of the button and symbols associated exclusively with this state are never displayed. The 'up' state specifies that the symbol is to be displayed when the button is in the 'up' state. The 'over' state specifies that the symbol is to be displayed when the mouse is over the defined 'hit' area of the button. The 'down' state specifies that the symbol is to be displayed when the mouse is pressed within the defined 'hit' area. A single layer can specify a symbol defined in multiple states and multiple layers can specify symbols used in the same state. Multiple symbols defined for the 'up', 'over', or 'down' states will be displayed according to their specified symbol depths.
For each layer an additional Transform element can be used to place the symbol and an RGBAColorTransform element can be used to apply a color transform to the symbol.

Attributes

states A list of states support by this layer.
Value Template(State,...)
Values
up
The mouse is outside the hit area of the button.
down
The mouse is pressed within the hit area of the button.
over
The mouse is within the hit area of the button.
hit
Symbol whose bounds define the hit area of the button.
symbol Symbol to use for the specified state.
depth Display depth to place the symbol. If only one symbol is used for a particular button layer then a display depth of 1 is sufficient. However if multiple symbols are used then each must be assigned an unique depth with symbols on a higher depth obscuring those on a lower depth.
TypeInteger
Default Value1

Child Elements

Transform
RGBAColorTransform

Parent Elements

Layers

Examples

Button Example
Button DragTarget Example
Button Sound Example

Previous Element
KerningPair

Next Element
Layers