A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: PLEASE help me with as3 code, im close to my deadline!

  1. #1
    Junior Member
    Join Date
    Aug 2010

    PLEASE help me with as3 code, im close to my deadline!

    Hi, in a game im making for college i want to disabled the keyboard input for a short while (maybe half a second, it doesnt really matter), but then to be enabled afterwards


    My game is kinda like guitar hero, the player uses 3 keys and presses them everytime the eggs (lol yes egg) reach the part on screen where the player has to press the key, but what is stopping them from permanently holding the key down? Because ill code it so that if the key is pressed and the egg collides with the hitpoint then add to score.

    Please help, i want to so that they cant hold the keys down, so that they have to keep pressing them???

  2. #2
    Senior Member
    Join Date
    Jul 2001
    San Jose California
    KeyboardEvent.KEY_UP - user presses a key and then you wait until they release it before your code accepts another input. Theoretically that should work.

Tags for this Thread

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