A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: bug of onKeyUp?

  1. #1
    Senior Member HBB Alfred's Avatar
    Join Date
    Apr 2004
    Location
    *^_^*
    Posts
    132

    bug of onKeyUp?

    code:

    var lis = {};
    lis.onKeyUp = function() {
    switch(Key.getCode())
    {
    case Key.LEFT: trace("left");break;
    case Key.RIGHT:trace("right");break;
    }

    };
    Key.addListener(lis);



    as above code,you press 'left' at first, then don't release 'left' and press 'right',then release 'left'.
    if you publish is flash 8 you cannt get the 'left' in output panel,but flash 7/6 can.......

    i am sorry for my awful english, but i want to know that is a bug??
    thx

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Yes, looks like a bug to me. Tested it with Flash8 under WinXP and if other key is pressed before first key is released then onKeyUp for first key fails.

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    London
    Posts
    211

    Lightbulb good to know

    Thanks-any more like that???
    ----------------------------
    A travel blog

    Landed At
    ----------------------------

  4. #4
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    711
    Damned, that's really anoying, I came into this bug too.For games we often have to manage several keys pressed at the same time and how can we turn around this ???

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