dizzyllama
11-20-2002, 09:11 PM
i've been driving myself crazy trying to use loadSound ... if someone knows where I'm going wrong, please point me in the right direction:
attachSound works, but thats only useful if the sound is available as a library resource -- this script works fine:
testlibrary = new Sound();
testlibrary.attachSound("hello.mp3");
testlibrary.start();
BUT for some reason using loadSound with that mp3 file does nothing. When the following script is tested, no audio is played:
testhello = new Sound();
testhello.onLoad = function() {
trace("starting sound");
testhello.start();
trace("sound started");
}
trace("loading sound");
testhello.loadSound("hello.mp3",false);
trace("sound loaded");
the flash Output window displays:
loading sound
starting sound
sound started
sound loaded
any ideas why this fails?
attachSound works, but thats only useful if the sound is available as a library resource -- this script works fine:
testlibrary = new Sound();
testlibrary.attachSound("hello.mp3");
testlibrary.start();
BUT for some reason using loadSound with that mp3 file does nothing. When the following script is tested, no audio is played:
testhello = new Sound();
testhello.onLoad = function() {
trace("starting sound");
testhello.start();
trace("sound started");
}
trace("loading sound");
testhello.loadSound("hello.mp3",false);
trace("sound loaded");
the flash Output window displays:
loading sound
starting sound
sound started
sound loaded
any ideas why this fails?