Game Development Reference
In-Depth Information
public function setPan(value:Number, name:String = null):void {
if (name) {
if (_soundList[name]) {
_soundList[name].pan = value;
} else {
throw new Error( " Sound " +name+ " does not
exist. " );
}
} else {
for (var i:String in _soundList) _soundList[i].pan
= value;
}
}
public function getPan(name:String):Number {
if (_soundList[name]) {
return _soundList[name].pan;
} else {
throw new Error(
"
Sound
"
+ name +
"
does not
exist.
"
);
}
return 0;
}
public function setTransform(transform:SoundTransform, name:
String = null):void {
if (name) {
if (_soundList[name]) {
_soundList[name].transform = transform;
} else {
throw new Error( " Sound " + name + " does not
exist. " );
}
} else {
for (var i:String in _soundList) _soundList[i].
transform = transform;
}
}
public function getTransform(name:String):SoundTransform {
if (_soundList[name]) {
return _soundList[name].transform;
} else {
throw new Error( " Sound " + name + " does not exist. " );
}
return null;
}
Search Nedrilad ::




Custom Search