KeyboardEvent

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,001
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 29, 2008

Now i will show you gamers and other flash actionscript 3.0 beginners how to use keyboard event.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (9)

Sign In or Sign Up now to post a comment!
  • because you should use the ascii code.

    the keys:UP.DOWN,LEFT,RIGHT,SHIFT,­SPACE are come from ascii too. You may find a ascii list for it.

  • hy,

    tnx for tutorial... :)

    and a question if anyone can help me.

    why does this work to me only if i use keys: UP,DOWN,LEFT,RIGHT,SHIFT or SPACE?

    but if i put in like letter c (or whatever other letter) in stead of SHIFT,UP,..., it doesn't work...it shows box from start and not when we press key 'c'...

    anyone has any idea what it might be wrong?

    tnx for the help ;)

  • uh...sure I guess

    T_T weird code

  • yeah if you are using as2 this will work in as3:

    alpha=0

    stage.addEventListener(Keyboar­dEvent.KEY_DOWN, reportKey

    function reportKey(event:keyboardEvent)­{

    _alpha=1

    }

  • Yes, I agree, this is easier, but it isn't in Actionscript 3.0. Great tutorial by the way =D

  • easier way to do it

    on box put

    onClipEvent(load){

    _alpha=0

    }

    onClipEvent(enterFrame){

    if(Key.isDown(Key.SPACE)){

    _alpha=100

    }

  • Thanks, exactly what I was looking for.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more