A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: detecting keys pressed

  1. #1
    Senior Member
    Join Date
    May 2005
    Location
    Wisconsin
    Posts
    181

    detecting keys pressed

    Im unclear why this code is not working? What am i doing wrong?


    code:

    import flash.ui.Keyboard;
    import flash.events.KeyboardEvent;

    stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyDownFunc);


    function KeyDownFunc(event){
    if(event.keyCode == Keyboard.UP){
    trace("enter");
    }
    }



    Josh
    Multimedia Programmer
    flashmajic.com

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    works for me.

  3. #3
    Member
    Join Date
    Aug 2010
    Posts
    33
    Works for me too. Are you getting a specific error message or is your output window just minimized somewhere on your screen?

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