Packageorg.goasap.interfaces
Interfacepublic interface IPlayable extends flash.events.IEventDispatcher
ImplementorsLinearGo, PlayableGroup, SequenceAdvance, SequenceBase

Defines a standard set of play controls and a play-state property.

This interface extends IEventDispatcher since playable items typically dispatch GoEvents, and combining the interfaces allows utilities to assume that they can use addEventListener() on IPlayable items.


Note: GoASAP's IPlayable structure was simplified at version 0.5.0 and now differs slightly from the information found in the Friends of Ed book, "The Essential Guide to Open Source Flash Development". Please regard the following changes:

  1. The IPlayableBase interface has been removed from the GoASAP core. The state property was moved into the IPlayable interface, and the playableID property is now treated as an optional convention.
  2. The play-state constants (PLAYING, etc.) have been moved into a new class called PlayStates.
  3. The class PlayableBase is now treated as entirely optional.

See also

PlayableBase
PlayStates


Public Properties
 PropertyDefined by
  state : String
[read-only] Normally this should return a PlayStates constant.
IPlayable
Public Methods
 MethodDefined by
  
pause():Boolean
Pause play.
IPlayable
  
resume():Boolean
Resume paused play.
IPlayable
  
skipTo(position:Number):Boolean
IPlayable
  
start():Boolean
Start playing.
IPlayable
  
stop():Boolean
Stop playing.
IPlayable
Property detail
stateproperty
state:String  [read-only]

Normally this should return a PlayStates constant.

Implementation
    public function get state():String
Method detail
pause()method
public function pause():Boolean

Pause play.

Returns
Boolean
resume()method 
public function resume():Boolean

Resume paused play.

Returns
Boolean
skipTo()method 
public function skipTo(position:Number):Boolean

Parameters
position:Number — Index indicating point in animation to skipTo. (Remember that you can rename paramters when implementing an interface in AS3, for example "seconds" or "index" instead of "position.")

Returns
Boolean
start()method 
public function start():Boolean

Start playing.

Returns
Boolean
stop()method 
public function stop():Boolean

Stop playing.

Returns
Boolean