init
Usage
private function init():void
Description
Returns
Nothing
fadeComplete
Usage
private function fadeComplete($stopOnComplete:Boolean):void
Description
Returns
Nothing
play
Usage
public function play($startTime:Number = 0, $loops:int = 0, $volume:Number = 1, $resumeTween:Boolean = true):void
Description
Plays the sound item.
Parameters
- $startTime
- The time, in seconds, to start the sound at (default: 0)
- $loops
- The number of times to loop the sound (default: 0)
- $volume
- The volume to play the sound at (default: 1)
- $resumeTween
- If the sound volume is faded and while fading happens the sound is stopped, this will resume that fade tween (default: true)
Returns
void
pause
Usage
public function pause($pauseTween:Boolean = true):void
Description
Pauses the sound item.
Parameters
- $pauseTween
- If a fade tween is happening at the moment the sound is paused, the tween will be paused as well (default: true)
Returns
void
stop
Usage
public function stop():void
Description
Stops the sound item.
Returns
void
fade
Usage
public function fade($volume:Number = 0, $fadeLength:Number = 1, $stopOnComplete:Boolean = false):void
Description
Fades the sound item.
Parameters
- $volume
- The volume to fade to (default: 0)
- $fadeLength
- The time, in seconds, to fade the sound (default: 1)
- $stopOnComplete
- Stops the sound once the fade is completed (default: false)
Returns
void
setVolume
Usage
public function setVolume($volume:Number):void
Description
Sets the volume of the sound item.
Parameters
- $volume
- The volume, from 0 to 1, to set
Returns
void
destroy
Usage
public function destroy():void
Description
Clears the sound item for garbage collection.
Returns
void
handleSoundComplete
Usage
private function handleSoundComplete($evt:Event):void
Description
Returns
Nothing