Flash CS3 AS2 Sound Controls. Not working as tutorial describes..

Discussion in 'Design and Graphics' started by MattSepeta, Apr 16, 2010.

  1. MattSepeta macrumors 65816

    MattSepeta

    Joined:
    Jul 9, 2009
    Location:
    375th St. Y
    #1
    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?
     
  2. Ride9650 macrumors 6502

    Joined:
    Jun 29, 2007
    #2
    did you simply name your buttons or are "play_btn" and "stop_btn" the actual "instance" names of the two buttons on the stage
     

Share This Page