A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: UIScrollBar disables Keypress ( PLEASE HELP)!

  1. #1
    Senior Member
    Join Date
    Dec 2005
    Posts
    142

    UIScrollBar disables Keypress ( PLEASE HELP)!

    OK this is a weird one... I put a UIScrollBar all the way in frame 15... and out of nowehere....keypresses dont work.. Does not matter what key...they just wont work... Well I found in the linkage that it was loading in frame 1, so i made it not do that...and all the keys worked once more...however, once it got to frame 15 (where it is located at) the keys would stop working on all frames once again....why is it doing this...is there a way to fix this?


    (it only seems to disable th on ( on (keyPress "<key>") { ) commands and not the if (Key.isDown(Key.whatever)) { commands..... )
    Last edited by molster; 03-04-2007 at 02:01 PM.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    With components you should generally use event listeners.

    PHP Code:
    listenerObject = new Object ();
    listenerObject.keyDown = function (eventObject)
    {
        if (
    Key.isDown(Key.RIGHT))
        {
            
    //function here
        
    }
    };
    myBut.addEventListener ("keyDown"listenerObject); 
    The other syntax is now ok for regular buttons and movieclips. In fact it is used with Flashlite.
    - The right of the People to create Flash movies shall not be infringed. -

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