A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Sound Problems

  1. #1
    Junior Member
    Join Date
    Feb 2004
    Location
    Southampton, England
    Posts
    16

    Sound Problems

    Hi,
    I have 2 buttons controlling the sound in my .fla (a on and an off button) my off button works fine just stopping the sound that I wasn’t it to stop, However this is not the case for my on button ! when you click the start button to start the sound it works but then you can click it again and again and it will play the sound again. So effectively they are playing at the same time. It sounds crap !

    If any one could just point me in the right direction or even post the action script it would be great.
    Thanks Scott

  2. #2
    not a free man 51055's Avatar
    Join Date
    Jun 2003
    Location
    UK
    Posts
    120
    you can add a variable to the on button:
    var music = true;
    and test when the button is released:
    on (release) {
    if (music == true){
    // do nothing
    } else{
    //your script goes here
    }
    }

    and add
    var music = false;
    on the off button.

    hope that helps

    andy

  3. #3
    Junior Member
    Join Date
    Feb 2004
    Location
    Southampton, England
    Posts
    16
    Thanks, all i hav 2 do now is try it !
    Thanks Scott

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