Packagecom.gaiaframework.api
Interfacepublic interface ISound extends IAsset, flash.events.IEventDispatcher

This is the interface for the SoundAsset.

See also

SoundAsset Documentation
flash.media.Sound
flash.media.SoundChannel
flash.media.SoundTransform
flash.media.ID3Info


Public Properties
 PropertyDefined by
 Inheritedbytes : 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
 Inheritedid : String
Returns the ID as set in site.xml.
IAsset
  id3 : ID3Info
[read-only]
ISound
  length : Number
[read-only]
ISound
 Inheritednode : XML
Returns the raw XML node of the asset
IAsset
 Inheritedorder : int
Returns the load order and position of the asset relative to other assets of the page.
IAsset
  pan : Number
ISound
 InheritedpercentLoaded : Number
Returns the bytesLoaded / bytesTotal.
IAsset
  position : Number
[read-only]
ISound
 InheritedpreloadAsset : Boolean
Specifies a value of true if the asset is set to preload, or false if it is on-demand.
IAsset
 InheritedshowProgress : 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
 Inheritedsrc : String
Returns the source path of the asset.
IAsset
 Inheritedtitle : String
Specifies the title of the asset.
IAsset
  transform : SoundTransform
ISound
  volume : Number
ISound
Public Methods
 MethodDefined by
 Inherited
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
 Inherited
Returns the loaded bytes of the file.
IAsset
 Inherited
Returns the total bytes of the file.
IAsset
 Inherited
load(... args):void
Used to load assets on-demand.
IAsset
  
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
Events
 EventSummaryDefined by
 Inherited Dispatched when the asset is finished loading.IAsset
Property detail
bytesLoadedproperty
bytesLoaded:int  [read-only]

Implementation
    public function get bytesLoaded():int

See also

bytesTotalproperty 
bytesTotal:int  [read-only]

Implementation
    public function get bytesTotal():int

See also

channelproperty 
channel:SoundChannel  [read-only]

Implementation
    public function get channel():SoundChannel

See also

id3property 
id3:ID3Info  [read-only]

Implementation
    public function get id3():ID3Info

See also

lengthproperty 
length:Number  [read-only]

Implementation
    public function get length():Number

See also

panproperty 
pan:Number  [read-write]

Implementation
    public function get pan():Number
    public function set pan(value:Number):void

See also

positionproperty 
position:Number  [read-only]

Implementation
    public function get position():Number

See also

soundproperty 
sound:Sound  [read-only]

Returns the reference to the Sound

Implementation
    public function get sound():Sound
transformproperty 
transform:SoundTransform  [read-write]

Implementation
    public function get transform():SoundTransform
    public function set transform(value:SoundTransform):void

See also

volumeproperty 
volume:Number  [read-write]

Implementation
    public function get volume():Number
    public function set volume(value:Number):void

See also

Method detail
fadeTo()method
public function fadeTo(value:Number, duration:Number, onComplete:Function = null):void

Adjust the volume over time to a particular value.

Parameters
value: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():void

Used to load an on-demand SoundAsset without playing it.

panTo()method 
public function panTo(value:Number, duration:Number, onComplete:Function = null):void

Adjust the pan over time to a particular value.

Parameters
value: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):void

Pause and unpause the Sound.

Parameters
flag:Booleantrue to pause, false to unpause.
play()method 
public function play(startTime:int = 0, loops:int = 0, soundTransform:SoundTransform = null):SoundChannel

Parameters
startTime:int (default = 0)
 
loops:int (default = 0)
 
soundTransform:SoundTransform (default = null)

Returns
SoundChannel

See also

stop()method 
public function stop():void

See also