Log in

View Full Version : setVolume woes



ItsMeOnly
12-28-2010, 09:39 PM
I have a little ActionScript 3 flash file for my gallery that plays nice background loop and also another mp3 if found. My problem is that while it plays both really nicely, I can't get setVolume to work.


var loadFile:String = this.root.loaderInfo.parameters.mp3;
var noLoop:String = this.root.loaderInfo.parameters.noLoop;

var soundLoop = new LoopingSound();
if (!noLoop) soundLoop.play(0, int.MAX_VALUE);


if (loadFile) {
var loadedSound = new Sound();
/* loadedSound.setVolume(50);
causes loadedSound not to be played at all
*/
loadedSound.load(new URLRequest("sound.php?load="+loadFile));
setTimeout(loadedSound.play, 5000);
loadedSound.setVolume(50);
/* does nothing*/
}

Anything I'm missing?