A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: on(keyPress) bug?

Hybrid View

  1. #1
    Junior Member
    Join Date
    Dec 2005
    Posts
    21

    on(keyPress) bug?

    I had a scroller that was working perfectly using the on (keyPress "<Down">) script. Then it just stopped working. I dismantled the script and the button and re-did the whole thing, but still no success.

    Is there some kind of bug at work here? Has anyone else ever experienced an event handler just dying like that?
    Using: Flash MX 2004, Mac OS X (10.2.8)

  2. #2
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270
    Moh,

    If you are placing code directly on to an author-time instance of your button you should be using the following:
    Code:
    // this responds to the mouse
    on (press) {
      ...
    }
    
    // and this responds to the keyboard
    onClipEvent (keyDown) {
      ...
    }
    To my knowledge, keyPress is not supported in MX 2004, only press, release, keyDown, and keyUp.

    +Q__
    Qwai•zang \kwî-'zan\ n [origin unknown] 1 : abstract designer, esp. of complex real-time experiments, c. 21st century

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