views:

123

answers:

1

I am using a ScrollPane that I want users to be able to scroll by clicking andywhere inside it. I have set up the pane like this:

    scrollDrag = true;
verticalScrollPolicy = ScrollPolicy.OFF;
source = someMovieClip;
    addEventListener(ScrollEvent.SCROLL, sidePaneVerticalScrollHandler);

I go on to show a few different SWFs on the source movieclip. These SWFs are spaced vertically by about 80 pixels each inside the clip. The scroll dragging is working fine when you click on one of these SWFs, however, it does not scroll if you hit the vertical space in between items. Is there a way to allow the scroll drag to work no matter where inside the scrollpane (or movieclip) the user clicks? I would rather not have to fill the empty vertical spaces with some blank SWF, or make the others have a greater height.

thanks for any insight

+1  A: 

I don't think there is a way to do it other than a modified version of what you suggested. You could first create a Sprite with a graphics fill of alpha 0 and use addChild to add each of your loaded swfs to the Sprite. Then, use the Sprite as the content for the scrollpane.

sberry2A
Unfortunately I think you are right.
SP