Overlapping Buttons, Play Sound Separately?????

YummyYummy Member Posts: 51
edited November -1 in Working with GS (Mac)
Hi Everyone!

Im in need of some help, iv been struggling for this for a long time, i have two buttons , when pressed play a sound, But the problem is they are overlapping. So when i click on one of the buttons , both play the sound.

Anyway to fix this???

Thanks In Advance

Comments

  • YummyYummy Member Posts: 51
    Bump* Anyone Please , I dont know how to do this.
  • YummyYummy Member Posts: 51
    Anyone, Please!!!!!
  • forkliftforklift Member Posts: 386
    Just curious. Why would you have two buttons overlap?
  • YummyYummy Member Posts: 51
    im making a piano app, and im trying to make the black key (that is on top of the white key) to make sound when pressed, but they both play at the same time!

    Im pulling out my hair. Iv been trying to solve this for hours , but cant figure it out.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Add a game boolean variable(I'll call it blackTouched) that gets changed to true when black key is touched and false when touch is released. Make the white keys sound playing behavior dependent on the state of the blackTouched variable being false. This will stop white keys from playing when any black key is pressed.
  • ToastKittenToastKitten Member Posts: 360
    I made this a while back for a question similar to this 1:

    http://gamesalad.com/game/play/85310

    Hope it helps!
  • YummyYummy Member Posts: 51
    you guys are heros!!!!! thank you so much!
Sign In or Register to comment.