A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: 2 players

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    16

    2 players

    I am creating a two player game, but the problem is that I dont know the script to get the other player to use different keys such as. a = to go left and s = to go right. Could someone give me the scripts fpr that?

  2. #2
    EXtreme Programmer
    Join Date
    Jul 2005
    Posts
    40

    Keys

    You can use:
    if (Key.isDown(keycode)) {
    statements;
    }
    Here is a formula to figure out a letters keycode.
    Key Number+64
    Key Number equals which letter in the alphbet it is, for example "z" is 26 (Key Code: 90) and "a" is 1 (Key Code: 65). Numbers are:
    Number+48

    I hope I helped,
    zach_297
    I have Macromedia Flash 8.
    How about you?

  3. #3
    Junior Member
    Join Date
    Jul 2005
    Posts
    16
    alright thanks but can you use it in an example?

  4. #4
    EXtreme Programmer
    Join Date
    Jul 2005
    Posts
    40

    An Example

    Here is an example:
    Attached Files Attached Files
    I have Macromedia Flash 8.
    How about you?

  5. #5
    Junior Member
    Join Date
    Jul 2005
    Posts
    16
    thanks.

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