| Package | com.gaiaframework.api |
| Interface | public interface ISound extends IAsset, flash.events.IEventDispatcher |
SoundAsset.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | bytes : int
Returns the bytes attribute value set in the
site.xml for byte-accurate preloading. | IAsset | |
| bytesLoaded : int [read-only]
| ISound | ||
| bytesTotal : int [read-only]
| ISound | ||
| channel : SoundChannel [read-only]
| ISound | ||
![]() | id : String
Returns the ID as set in
site.xml. | IAsset | |
| id3 : ID3Info [read-only]
| ISound | ||
| length : Number [read-only]
| ISound | ||
![]() | node : XML
Returns the raw XML node of the asset
| IAsset | |
![]() | order : int
Returns the load order and position of the asset relative to other assets of the page.
| IAsset | |
| pan : Number | ISound | ||
![]() | percentLoaded : Number
Returns the bytesLoaded / bytesTotal.
| IAsset | |
| position : Number [read-only]
| ISound | ||
![]() | preloadAsset : Boolean
Specifies a value of
true if the asset is set to preload, or false if it is on-demand. | IAsset | |
![]() | showProgress : Boolean
Specifies whether the asset will cause the asset preloader to appear when loaded on-demand.
| IAsset | |
| sound : Sound [read-only]
Returns the reference to the Sound
| ISound | ||
![]() | src : String
Returns the source path of the asset.
| IAsset | |
![]() | title : String
Specifies the title of the asset.
| IAsset | |
| transform : SoundTransform | ISound | ||
| volume : Number | ISound | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
abort():void
Used to manually abort an on-demand asset load.
| IAsset | |
|
fadeTo(value:Number, duration:Number, onComplete:Function = null):void
Adjust the volume over time to a particular value.
| ISound | ||
![]() |
getBytesLoaded():int
Returns the loaded bytes of the file.
| IAsset | |
![]() |
getBytesTotal():int
Returns the total bytes of the file.
| IAsset | |
![]() |
load(... args):void
Used to load assets on-demand.
| IAsset | |
|
loadWithoutPlaying():void
Used to load an on-demand SoundAsset without playing it.
| ISound | ||
|
panTo(value:Number, duration:Number, onComplete:Function = null):void
Adjust the pan over time to a particular value.
| ISound | ||
|
pause(flag:Boolean):void
Pause and unpause the Sound.
| ISound | ||
|
play(startTime:int = 0, loops:int = 0, soundTransform:SoundTransform = null):SoundChannel
| ISound | ||
|
stop():void
| ISound | ||
| bytesLoaded | property |
bytesLoaded:int [read-only]Implementation
public function get bytesLoaded():int
See also
| bytesTotal | property |
bytesTotal:int [read-only]Implementation
public function get bytesTotal():int
See also
| channel | property |
channel:SoundChannel [read-only]Implementation
public function get channel():SoundChannel
See also
| id3 | property |
id3:ID3Info [read-only]Implementation
public function get id3():ID3Info
See also
| length | property |
length:Number [read-only]Implementation
public function get length():Number
See also
| pan | property |
pan:Number [read-write]Implementation
public function get pan():Number
public function set pan(value:Number):void
See also
| position | property |
position:Number [read-only]Implementation
public function get position():Number
See also
| sound | property |
sound:Sound [read-only]Returns the reference to the Sound
Implementation public function get sound():Sound
| transform | property |
transform:SoundTransform [read-write]Implementation
public function get transform():SoundTransform
public function set transform(value:SoundTransform):void
See also
| volume | property |
volume:Number [read-write]Implementation
public function get volume():Number
public function set volume(value:Number):void
See also
| fadeTo | () | method |
public function fadeTo(value:Number, duration:Number, onComplete:Function = null):voidAdjust the volume over time to a particular value.
Parametersvalue:Number — A value between 0 and 1.
|
|
duration:Number — The duration of the fade in seconds.
|
|
onComplete:Function (default = null) — The callback function to call when the fade is complete
|
| loadWithoutPlaying | () | method |
public function loadWithoutPlaying():voidUsed to load an on-demand SoundAsset without playing it.
| panTo | () | method |
public function panTo(value:Number, duration:Number, onComplete:Function = null):voidAdjust the pan over time to a particular value.
Parametersvalue:Number — A value between -1 and 1.
|
|
duration:Number — The duration of the pan in seconds.
|
|
onComplete:Function (default = null) — The callback function to call when the pan is complete
|
| pause | () | method |
public function pause(flag:Boolean):voidPause and unpause the Sound.
Parametersflag:Boolean — true to pause, false to unpause.
|
| play | () | method |
public function play(startTime:int = 0, loops:int = 0, soundTransform:SoundTransform = null):SoundChannelParameters
startTime:int (default = 0) |
|
loops:int (default = 0) |
|
soundTransform:SoundTransform (default = null) |
SoundChannel |
See also
| stop | () | method |