PDA

View Full Version : ScrollPane scrolling


carriker
09-04-2006, 10:44 PM
I've got a pretty simple question (I think). I have a ScrollPane displaying a MC. When I click on items inside the MC I want to be able to use the arrow keys to manipulate them without the arrow keys causing the ScrollPane to scroll.

More simply put, I want to disable the ability to scroll the ScrollPane with the arrow keys. Is there an easy way to do this?

Thanks in advance,

--carriker

Mazoonist
09-05-2006, 01:16 AM
Hey, Carriker,

Yes! There is an easy way! Give your scrollPane an instance name. Then, somewhere in your code, include this line (of course, substitute the name below for whatever instance name you chose):

myScrollPane.focusEnabled = false;

You'll still be able to manipulate the horizontal and vertical scroll bars with the mouse, but not with the arrow keys. And the content of the scroll pane can still get input from those keys. Should be just what you're looking for.

carriker
09-05-2006, 02:47 PM
Thanks a lot, worked like a charm.

--carriker