PDA

View Full Version : external sound not loading


jeffr
10-22-2004, 04:12 PM
A newbie to Flash. I'm attempting to write a simple application that is a slide show with text and voiceover. All data is external loaded from an XML file. When playing the app local it runs fine, but when I put on the server, the sound won't load. The images load up fine (they are external as well).

All data (graphics and mp3 files) are in the same folder as the app.

So, how come the sound won't load? I'm assuming that since the images load that I'm not violating security....

The internal sound plays fine (no load message)

Flash MX 2004 Pro
jpg images
mp3 audio files.

Here's the function that plays the sound. It's almost straight out of the Ref file...

function playpt_sound(wSound) {
// load sound
pt_sound.stop();
pt_sound.onLoad = function(success) {
if (success) {
_root.trace_msg.text=_root.trace_msg.text+"%0D"+"pt_sound is loaded";
//pt_sound.start();
} else {
_root.trace_msg.text=_root.trace_msg.text+"pt_sound not loaded";
alertSound = new Sound();
alertSound.attachSound("ping.mp3");
alertSound.start();
}
};
pt_sound.onSoundComplete = checksoundEnd;
pt_sound.loadSound(wSound, true);
_root.trace_msg.text="loading sound"+wSound;
}

thanks

Cota
10-23-2004, 06:27 AM
Here's some great stuff on loading sound
http://kennybellew.com/tutorial/
hope it helps

jeffr
10-25-2004, 02:50 PM
Thanks Cota,

I've look at the tutorial and I seem to be complying with what he says in the tutorial...