;

PDA

Click to See Complete Forum and Search --> : UIScrollBar disables Keypress ( PLEASE HELP)!


molster
03-04-2007, 12:58 PM
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..... )

cancerinform
03-05-2007, 10:18 AM
With components you should generally use event listeners.


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.