A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: sound problem on my buttons

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    1

    sound problem on my buttons

    I loaded 2 sound fx into my library: a click and a beep.

    I want my button to click on the rollover, so I put it on the over state.
    I want my button to beep when you click on it, so I put the beep on the down state.

    My problem is when I rollover it clicks, press down it beeps,but after I click the button, since the mouse is still on the button it clicks again.

    So, I'm getting a click-beep-click.

    How do I stop my rollover state from repeating after I click the button?

    Thanks!

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Posts
    3
    you could make a variable to prevent the second roll over. A Bool variable. nest an if statement inside your rollover and make a rollout. messy code but it works

    on (rollOver){
    if (bool != true){
    play sound;
    bool = true:
    }}

    on (press){
    play other sound;
    }

    on(rollOut){
    bool=false;
    }

    excuse my code, its not real i just dont want to load up flash right now and make it.

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