A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: sound on buttons

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    110
    HI, I am creating a movie with various buttons, once pressed each of these button plays a wav file, my problem is if the user presses the next button before the previous one has finished there is now two wav files playing. I have about 10 buttons in total. How do I stop the previous wav file playing when the new one is selected???????

    Thanks!!!!!!

    Michelle

  2. #2
    Senior Member
    Join Date
    Jun 2001
    Posts
    267
    on(release)
    stopAllSounds();


    Add the above code to the buttons. That should stop all the sounds that are currently playing. If you put the play sound after it, it should work.
    Happy Flashing!

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    110
    Hi Thanks for that however I am still a little confused...

    I have put the sound on the down section of the button. So I didn’t put in any actions for it to play. I can see what you are saying for the stop all sounds action. What do I enter to make the wav file to play after this action?

    I hope this makes sense....

    Thanks
    Michelle

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    267
    Ok. This is a basic problem. It seems like you don't really understand buttons. The up, over, and down states on the button symbol are just visual states. You DON'T add actions to these frames. Instead you add actions to the button instances. How do you do that? Easy. Make sure the button is selected when you open the actions panel. Then it should say "Object Actions" instead of "Frame Actions". Here is where you add the action. Button actions are attached to button instances, NOT button frames.
    If you need any more help, let me know.

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