User Tools

Site Tools


button

Button

The Button hides or shows DisplayObjects on specified state events.

A button reacting to the “out” state
Button screenshot

Characteristic

Definition
Type Interactive Display Object
Category Element
Scope *
Position *
Parents Container
Children none
Gestures none
Requirements hit and initial

Attribute

Type

Description
debug true/false prints status messages to console
dispatch text Assigns a message to dispatch with a button state event
down object reference Sets button state association with down event
hit object reference The hit object is the object receiving the input events
initial object reference Sets the initial button state object
mouseDown object reference Sets button state association with mouse down event
mouseOut object reference Sets button state association with mouse out event
mouseOver object reference Sets button state association with mouse over event
mouseUp object reference Sets button state association with mouse up event
out object reference Sets button state association with out event
over object reference Sets button state association with over event (mouse only)
toggle text An alternative to button state events, the toggle displays the next child at each event defined by the toggle value (e.g. toggle=“up”)
touchDown object reference Sets button state association with touch down event
touchOut object reference Sets button state association with touch out event
touchOver object reference Sets button state association with touch out event
touchUp object reference Sets button state association with touch up event
up object reference Sets button state association with up event

See Also: Display Attributes

<Button x="750" y="200" dispatch="initial:initial:down:down:up:up:over:over:out:out" hit="hit-area" initial="white" over="green" down="blue" up="red" out="purple">            
    <Graphic id="hit-area" shape="circle" radius="100" alpha="0" />        
    <Graphic id="white" color="0xFFFFFF" shape="circle" radius="100" lineStroke="0" />     
    <Graphic id="red" color="0xFF0000" shape="circle" radius="100" lineStroke="0" />       
    <Graphic id="green" color="0x00FF00" shape="circle" radius="100" lineStroke="0" />
    <Graphic id="blue" color="0x0000FF" shape="circle" radius="100" lineStroke="0" />
    <Graphic id="purple" color="0xFF00FF" shape="circle" radius="100" lineStroke="0" />
</Button>
button.txt · Last modified: 2015/09/18 12:15 by glass