A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [HELP] [MX04] Phantom key presses

  1. #1
    Senior Member mandissected's Avatar
    Join Date
    Jan 2005
    Location
    Berwick - England
    Posts
    338

    [HELP] [MX04] Phantom key presses

    Ok guys, why does the following code run when the keyboard isn't even touched?

    Code:
    if (Key.isDown(Key.SHIFT)) {
      trace("drop bomb");
      dropBomb(ob);
    }
    Last edited by mandissected; 11-16-2006 at 06:22 PM.

  2. #2
    Senior Member fil_razorback's Avatar
    Join Date
    Jul 2005
    Location
    Paris, France
    Posts
    607
    Don't let the guinea pig run over the keyboard.

  3. #3
    Please, Call Me Bob trogdor458's Avatar
    Join Date
    Aug 2006
    Location
    Pensacola, FL
    Posts
    915
    er...is caps lock on? doubt that does anything though

    check to see you dont have that code elsewhere, make sure its in that if statement only

    other than that, no clue (is your keyboard sticking?) though i doubt its a keyboard problem

  4. #4
    Senior Member mandissected's Avatar
    Join Date
    Jan 2005
    Location
    Berwick - England
    Posts
    338
    the code is nowhere else and i put the trace in there to make sure it was being triggered from that point anyway. no caps and no keyboard problems. also tried changing it to a different key but got the same problem. very strange.

  5. #5
    Member
    Join Date
    Nov 2006
    Posts
    93
    Have you tried 'on keypress' instead of 'if key is down' to see if the bug still remains?

  6. #6
    Banned XareoX's Avatar
    Join Date
    Aug 2006
    Posts
    462
    have you put it on a onClipEvent or function??

  7. #7
    Senior Member mandissected's Avatar
    Join Date
    Jan 2005
    Location
    Berwick - England
    Posts
    338
    xtrava - I haven't tried the on keypress approach yet as it's a mc rather than a button but I guess I could try converting it later.

    Xareox - It's in a function

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