Professional Web Applications Themes

Another keyboard question - Macromedia Flash

I'm trying to control my standalone flash mx project with the keyboard. It works fine when I use next code: if (key.isDown(key.PGUP)){.....} However, now I try to use the "+" and "-" key and problems starts. This is the code I use: if (key.isDown(189)){...} if (key.isDown(107)){...} 107 means the "+" key which is working fine but the "-" key (189) is causing problems. On an old Mac only the "+" works, on a brand new Mac OSX system it doesn't work at all. On a Window 2000 system I can use the "+" key on the numeric keyboard but not ...

  1. #1

    Default Another keyboard question

    I'm trying to control my standalone flash mx project with the keyboard.
    It works fine when I use next code:

    if (key.isDown(key.PGUP)){.....}

    However, now I try to use the "+" and "-" key and problems starts.

    This is the code I use:

    if (key.isDown(189)){...}
    if (key.isDown(107)){...}

    107 means the "+" key which is working fine but the "-" key (189) is
    causing problems. On an old Mac only the "+" works, on a brand new Mac
    OSX system it doesn't work at all. On a Window 2000 system I can use the
    "+" key on the numeric keyboard but not the "-" key. The "-" key is only
    working on the keyboard itself.

    Do I use the wrong (ascii) codes?

    thanks,
    Diederik

    Diederik Guest

  2. #2

    Default Re: Another keyboard question

    Diederik wrote:
    > I'm trying to control my standalone flash mx project with the keyboard.
    > It works fine when I use next code:
    >
    > if (key.isDown(key.PGUP)){.....}
    >
    > However, now I try to use the "+" and "-" key and problems starts.
    >
    > This is the code I use:
    >
    > if (key.isDown(189)){...}
    > if (key.isDown(107)){...}
    >
    > 107 means the "+" key which is working fine but the "-" key (189) is
    > causing problems. On an old Mac only the "+" works, on a brand new Mac
    > OSX system it doesn't work at all. On a Window 2000 system I can use
    > the "+" key on the numeric keyboard but not the "-" key. The "-" key is
    > only working on the keyboard itself.
    >
    > Do I use the wrong (ascii) codes?
    >
    > thanks,
    > Diederik
    >
    I found the solution in appendix B.

    This is working on all platforms:
    if (key.isDown(109) || key.isDown(189)){...}
    if (key.isDown(107) || key.isDown(187)){...}

    Maybe I should read the manual more often.

    --
    Diederik

    Diederik Guest

Similar Threads

  1. Keyboard Shortcut Question
    By Ol' Whozit in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 9
    Last Post: June 24th, 09:28 PM
  2. on screen keyboard question
    By thechosen1 webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 3
    Last Post: February 3rd, 11:11 AM
  3. Replies: 0
    Last Post: December 31st, 06:40 PM
  4. keyboard
    By black francis in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: July 29th, 01:51 AM
  5. Question Pro Keyboard
    By in forum Mac Applications & Software
    Replies: 6
    Last Post: July 11th, 07:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139