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