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
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