Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Stop and Start a Scroll Pane from scrolling?



I want to stop a scroll pane from scrolling in certain conditions, this seems to work:



button.addEventListener(MouseEvent.MOUSE_DOWN, cancelBubble);

private function cancelBubble(e:Event):void

 But is there a way to get the scroll pane to start scrolling again?


BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Stop and Start a Scroll Pane from scrolling?

If you know by how much, you could probably use the Tweener class.

Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Stop and Start a Scroll Pane from scrolling?

[ Edited ]

It should scroll fine as long as you don't mouse down on/over the button. You're not actually turning scrolling off for the ScrollPane; you're only stopping the ScrollPane from receiving the MOUSE_DOWN event when the intended target of the event is the button.


If you want to turn scrolling off, set the ScrollPane's scrollDirection to ScrollDirection.NONE, and then to turn it back in, change scrollDirection back to ScrollDirection.BOTH or whichever direction. When doing this, MOUSE_UP events for the ScrollPane should happen at the stage level to make sure MOUSE_DOWN is always reversed and to be consistent with default behavior.