| Package | com.acleveraddress.net.multi_loader.extras |
| Class | public class SoundItem |
| Property | Defined by | ||
|---|---|---|---|
| channel : SoundChannel
The SoundChannel you wish to associate.
| SoundItem | ||
| isMuted : Boolean | SoundItem | ||
| isPaused : Boolean | SoundItem | ||
| sound : Sound
The Sound object to be controlled
| SoundItem | ||
| volume : Number
The volume, ranging from 0 (silent) to 1 (full volume).
| SoundItem | ||
| Method | Defined by | ||
|---|---|---|---|
|
SoundItem(sound:Sound, channel:SoundChannel = null)
Sets up your sound item
| SoundItem | ||
|
dispose():void
Disposes the sound
| SoundItem | ||
|
mute(flag:Boolean):void
Mutes or umutes the Sound object
| SoundItem | ||
|
pause():void
Pauses the sound
| SoundItem | ||
|
play(startTime:Number = 0, loops:int = 0, volume:Number = 1, panning:Number = 0):SoundChannel
Play the sound object
| SoundItem | ||
|
resume():void
Resumes the paused sound
If the sound wasn't paused then it will start playing again from the beginning | SoundItem | ||
|
stop():void
Stops the sound
| SoundItem | ||
|
toggleMute():void
Toggles whether the sound is muted or not
| SoundItem | ||
| channel | property |
public var channel:SoundChannelThe SoundChannel you wish to associate.
| isMuted | property |
public var isMuted:Boolean
| isPaused | property |
public var isPaused:Boolean
| sound | property |
public var sound:SoundThe Sound object to be controlled
| volume | property |
volume:Number [read-write]The volume, ranging from 0 (silent) to 1 (full volume).
Implementation public function get volume():Number
public function set volume(value:Number):void
| SoundItem | () | constructor |
public function SoundItem(sound:Sound, channel:SoundChannel = null)Sets up your sound item
Parameterssound:Sound — The Sound Object to be controlled
|
|
channel:SoundChannel (default = null) — The SoundChannel you wish to associate
|
See also
| dispose | () | method |
public function dispose():voidDisposes the sound
| mute | () | method |
public function mute(flag:Boolean):voidMutes or umutes the Sound object
Parametersflag:Boolean — Set to true to mute the sound, or false to unmute
|
| pause | () | method |
public function pause():voidPauses the sound
See also
| play | () | method |
public function play(startTime:Number = 0, loops:int = 0, volume:Number = 1, panning:Number = 0):SoundChannelPlay the sound object
ParametersstartTime:Number (default = 0) — The initial position in milliseconds at which playback should start
|
|
loops:int (default = 0) — Defines the number of times a sound loops back to the startTime value before the sound channel stops playback
|
|
volume:Number (default = 1) — The volume, ranging from 0 (silent) to 1 (full volume)
|
|
panning:Number (default = 0) — The left-to-right panning of the sound, ranging from -1 (full pan left) to 1 (full pan right). A value of 0 represents no panning (center)
|
SoundChannel — The SoundChannel object used to control the sound
|
| resume | () | method |
public function resume():void
Resumes the paused sound
If the sound wasn't paused then it will start playing again from the beginning
See also
| stop | () | method |
public function stop():voidStops the sound
| toggleMute | () | method |
public function toggleMute():voidToggles whether the sound is muted or not