A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: how to use other keys for "key.isDown" function

Hybrid View

  1. #1
    Member
    Join Date
    Sep 2008
    Posts
    36

    Smile I think you could use this:

    Code:
    onClipEvent(enterFrame) {
        if (Key.isDown(65)) {//==Key.LEFT
            this._x-=3;//or something else...
        }
        if (Key.isDown(67)) {//==Key.RIGHT
            this._x+=3;//or something else...
        }
        if (Key.isDown(87)) {//==Key.UP
            this._y-=3;//or something else...
        }
        if (Key.isDown(83)) {//==Key.DOWN
            this._y+=3;//or something else...
        }
    }
    All keycodes:

    A=65
    B=66
    C=67
    D=68
    E=69
    F=70
    G=71
    H=72
    I=73
    J=74
    K=75
    L=76
    M=77
    N=78
    O=79
    P=80
    Q=81
    R=82
    S=83
    T=84
    U=85
    V=86
    W=87
    X=88
    Y=89
    Z=90

    If you need more help with your games, just ask....
    Last edited by fjodorvanveen; 12-05-2008 at 01:29 PM. Reason: forget code 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