<<Heavy Sigh>>
I'm using Flash 8 Pro and created a slide presentation. The
top slide has common elements, including audio file control
buttons. Each of the content slides has an external audio file
associated with it, which the viewer can play by clicking the
"play" button. The slide and the file have the same name so the
"play" ActionScript can determine the currentSlide._name, add
".mp3" to the end of it and play it. Other buttons on this slide do
work in the browser -- the ones that move the viewer from slide to
slide and back. When I take a look at the variables, they are all
reported like this: "_level0.Characters.Flotsam_Jetsam".
Unfortunately, it works flawlessly in the Flash preview, but
does not work in Dreamweaver (local) preview, or when published to
the web. Here is the code I'm using for the play button -- as you
can see, I took the advice of the previous thread and added "this"
in parentheses after "new Sound" --
on (release) {
// create a new Sound object
var my_sound:Sound = new Sound(this);
var my_slide = currentSlide._name;
// if the sound loads, play it; if not, trace failure
loading
my_sound.onLoad = function(success:Boolean) {
if(success) {
my_sound.start();
trace("Sound loaded");
} else {
trace("Sound failed");
}
};
my_sound.loadSound(my_slide+".mp3", false);
}
Maybe I need a slightly modified "this"? The sound files are
a little large, but it does seem as if they should at least play
from the Dreamweaver preview...
I have Flash Player 9 installed, if that could possibly have
anything to do with this. Any information will be gladly received.
Thanks, k