PlayPauseButton

Kind of class: public class
Package:
Inherits from:
  • Sprite
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.ui.PlayPauseButton
File last modified: Friday, 12 November 2010, 15:34:14
Play/Pause Toggle Button UI Component
Events broadcasted to listeners
  • UIEvent.PAUSE_CLICK # On pause button click
  • UIEvent.PLAY_CLICK # On play button click

Summary

Constructor
  • PlayPauseButton (w:Number, h:Number, backgroundColor:uint = 0x000000, buttonColor:uint = 0xFFFFFF)
Instance methods
  • toggle () : void
    • Toggles play/pause button visibility (does not transmit UIEvent)
  • setPlayState (ps:Boolean) : void
    • Sets play state.
  • getPlayState () : Boolean
    • Gets play state.

Constructor

PlayPauseButton

function PlayPauseButton(w:Number, h:Number, backgroundColor:uint = 0x000000, buttonColor:uint = 0xFFFFFF)
Parameters
 

Instance methods

getPlayState

function getPlayState() : Boolean

Gets play state. A value of true means playback is occuring

setPlayState

function setPlayState(ps:Boolean) : void

Sets play state. A value of true shows pause button (does not transmit UIEvent)

toggle

function toggle() : void

Toggles play/pause button visibility (does not transmit UIEvent)