Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MattSepeta

macrumors 65816
Original poster
I am trying to follow the walk-thru in the Flash Documentation, but it is not working. My goal is a play button and a stop button that control a mp3 file via linkage and AS2.

I named the buttons play_btn and stop_btn, respectively.

Script:

var song_sound:Sound = new Sound();
song_sound.attachSound("wonderful");
play_btn.onRelease = function() {
song_sound.start();
};
stop_btn.onRelease = function() {
song_sound.stop();
};



The mp3 file has the proper linkage properties in the library, and will play in the library when I preview it, and this script is located on the only layer I have, on the first frame which is a keyframe, and the only frame.

When I export or preview the swf, the mouse responds when mousing over the buttons, but when I hit play, it does not play any sound.

Am I missing something?
 
did you simply name your buttons or are "play_btn" and "stop_btn" the actual "instance" names of the two buttons on the stage
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.