Stopping Button Sounds when clicked 2wice
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Stopping Button Sounds when clicked 2wice

  1. #1
    Junior Member
    Join Date
    May 2000
    Posts
    7

    Red face

    I'm designing an interactive CD-ROM for my company. I have added buttons that play a sound (sample sounds of our products) on the "down" state. Some of the sounds are quite long. I would like the sound to stop when another button (i.e. a button that jumps to another scene or label), or the same button, is clicked on.

    How do i do this?

    Thanx in advance

    ------------------
    there is no spoon

  2. #2

    Post

    hello,
    well u can add the action to the button
    "stop all sounds". (if this is on a different button)
    or if you want to use the same button. You could make it so that when you press the button, the button is replaced by another button that looks the same but has a different action to it. ie; stop all sounds well im not very good with this so this was just a brief overview of what i think could work. hope it helped
    -bellz-

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,092

    Cool

    Just make a Movie clip with 3 frames
    Frame 1
    Stop
    frame 2
    add the sound and set the sync box to START
    frame 3
    add the sound only this time set the sync box to STOP
    Then you can Use tell Target to go to and Play frame 2 which will Start the sound
    and also using Tell target to go to frame 3
    which will Stop a sound.

    Understand what im saying?



  4. #4
    Junior Member
    Join Date
    May 2000
    Posts
    7

    Stopping Button Sounds when clicked 2wice

    Alright, I figured that to stop the sound when any other button is pressed, all I have to do is insert a "stop all sounds" action. easy enough.

    But, I think the thing I want to do if the button with the sound attached is clicked is write an "if" statement that would go like this:

    If "button sound" is playing
    stop all sounds
    Else
    play "button sound"


    I just don't know how to write it. I'm reading up on the subject but figured I would probably get a quicker response if i posted it on the web.

    Thanx for the replies so far & thanx, in advance for all future replies

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

Poll by Flashkit.com