Property | Defined By | ||
---|---|---|---|
x : Number [read-only]
Returns the current X position
| SoundObject |
Method | Defined By | ||
---|---|---|---|
SoundObject(sSound:*, nStartVolume:Number = 1, bLoops:Boolean = false, bLocationBased:Boolean = false, sGroup:String = default)
Creates a new sound object. | SoundObject | ||
_Dispose():void
Cleans the sound data. | SoundObject | ||
_Update():void
Updates the sound object. | SoundObject | ||
FadeIn(nSetFadeSpeed:Number = 0.025):void
Fades in the sound. | SoundObject | ||
FadeOut(nSetFadeSpeed:Number = 0.025):void
Fades out the sound object. | SoundObject | ||
GetGroup():String
Returns the sound object's string group name. | SoundObject | ||
GetOwner():Object
Returns the owner of the sound object. | SoundObject | ||
GetPos():Number
Returns the current X position
| SoundObject | ||
IsPaused():Boolean
Returns if the sound object is paused. | SoundObject | ||
IsStopped():Boolean
Returns if the sound object is stopped (ie. | SoundObject | ||
Pause():void
Pauses the sound object. | SoundObject | ||
Play(nPosition:Number = 0):void
Plays the sound object. | SoundObject | ||
RemoveParent():void
Removes the sound object's current parent. | SoundObject | ||
Resume():void
Resumes the paused sound object. | SoundObject | ||
SetGroup(sGroup:String):void
Sets the sound object's string group name. | SoundObject | ||
SetOwner(objOwner:Object):void
Sets the owner of the sound object. | SoundObject | ||
SetParent(newParent:Object):void
Sets the sound object to a parent (will follow its current X position)
Requires a x variable (or getter) to be on the parent object
| SoundObject | ||
SetPos(nNewPosX:Number):void
Sets the position of the sound object (must be location-based for to have any effect). | SoundObject | ||
SetVolume(nNewVolume:Number):void
Sets the volume of the sound object. | SoundObject | ||
Stop():void
Stops the sound object. | SoundObject |
x | property |
x:Number
[read-only] Returns the current X position
public function get x():Number
SoundObject | () | Constructor |
public function SoundObject(sSound:*, nStartVolume:Number = 1, bLoops:Boolean = false, bLocationBased:Boolean = false, sGroup:String = default)
Creates a new sound object.
ParameterssSound:* — The sound: Sound, Class, or String (URL) is accepted.
| |
nStartVolume:Number (default = 1 ) — The starting volume of the sound
| |
bLoops:Boolean (default = false ) — Does the sound loop?
| |
bLocationBased:Boolean (default = false ) — Is this sound location based (pans left/right based on the X position)
| |
sGroup:String (default = default ) — The string sound group this sound is part of (not to be confused with SoundGroup class)
|
_Dispose | () | method |
public function _Dispose():void
Cleans the sound data.
_Update | () | method |
public function _Update():void
Updates the sound object.
FadeIn | () | method |
public function FadeIn(nSetFadeSpeed:Number = 0.025):void
Fades in the sound.
Parameters
nSetFadeSpeed:Number (default = 0.025 ) — The speed to fade in at
|
FadeOut | () | method |
public function FadeOut(nSetFadeSpeed:Number = 0.025):void
Fades out the sound object. This will remove the sound object after finishing!
Parameters
nSetFadeSpeed:Number (default = 0.025 ) — The speed to fade out at
|
GetGroup | () | method |
public function GetGroup():String
Returns the sound object's string group name.
ReturnsString —
|
GetOwner | () | method |
public function GetOwner():Object
Returns the owner of the sound object. (usually what emitted it).
ReturnsObject —
|
GetPos | () | method |
public function GetPos():Number
Returns the current X position
ReturnsNumber —
|
IsPaused | () | method |
public function IsPaused():Boolean
Returns if the sound object is paused.
ReturnsBoolean —
|
IsStopped | () | method |
public function IsStopped():Boolean
Returns if the sound object is stopped (ie. dead).
ReturnsBoolean —
|
Pause | () | method |
public function Pause():void
Pauses the sound object.
Play | () | method |
public function Play(nPosition:Number = 0):void
Plays the sound object.
Parameters
nPosition:Number (default = 0 ) — The position to start playing at.
|
RemoveParent | () | method |
public function RemoveParent():void
Removes the sound object's current parent.
Resume | () | method |
public function Resume():void
Resumes the paused sound object.
SetGroup | () | method |
public function SetGroup(sGroup:String):void
Sets the sound object's string group name.
Parameters
sGroup:String — The string group name
|
SetOwner | () | method |
public function SetOwner(objOwner:Object):void
Sets the owner of the sound object.
Parameters
objOwner:Object |
SetParent | () | method |
public function SetParent(newParent:Object):void
Sets the sound object to a parent (will follow its current X position) Requires a x variable (or getter) to be on the parent object
Parameters
newParent:Object |
SetPos | () | method |
public function SetPos(nNewPosX:Number):void
Sets the position of the sound object (must be location-based for to have any effect).
Parameters
nNewPosX:Number — The position on the x axis
|
SetVolume | () | method |
public function SetVolume(nNewVolume:Number):void
Sets the volume of the sound object.
Parameters
nNewVolume:Number — The volume to set to
|
Stop | () | method |
public function Stop():void
Stops the sound object. This will remove the sound object completely!