A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Button with Sound and Actionscript problem after hit loads next scene

  1. #1
    Member
    Join Date
    May 2000
    Posts
    34

    Button with Sound and Actionscript problem after hit loads next scene

    I have a button with music that plays on hit and an action script. Everytime it plays the music works fine but it immediately goes to the next scene.

    button ActionScript

    on (press) {
    stopAllSounds();
    }
    on (release) {
    play();
    }

    I don't want the next scene to launch while the music is playing. I am loading up 11 tracks and I want people to be able to pick a track to listen and then if choose another.

    For the life of me I can't seem to figure out what I am missing.

    Thanks in advance for your help.

    Deb

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    on (release) {
    play();
    }

    Well, that is telling the timeline to play, so maybe it's going to the next scene.

  3. #3
    Member
    Join Date
    May 2000
    Posts
    34
    I have tried everything. Has anyone else had this problem and if so how did you fix it. I just want the music to play on the scene and not jump to a new scene.

    Thanks

    Deb

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Use attachSound if the sound file is in the library, or loadSound if it's an mp3 that you want to stream, meaning, a long song, not a loop.

    You can read through this thread for more on sound, and I have some tutorials up in the tutes link in my footer.

    http://www.flashkit.com/board/showthread.php?t=649910

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center