A clickable button component that may display content such as text and an image.

Add button content

Display text in a button:

<js:TextButton text="Click Me"/>

Display both text and an image in a button:

<js:ImageAndTextButton text="Click Me" image="path/to/image.png"/>

Listen to events

Listen for a button click event:

<js:TextButton text="Click Me" click="onClick()"/>
private function onClick():void
trace("button clicked!");

Change button appearance

Set font styles on a single button:

<js:TextButton text="Click Me">
        <js:SimpleCSSStyles fontFamily="serif" fontSize="20"
fontWeight="bold" fontStyle="italic" color="#ff0000"/>



  • No labels