home
contact

ok.. so this is one of those things that I run into every once in a blue moon and have to scratch my head a while to figure it out.. so I'm recording it here so I can come back to it.

Basically the "version 2" ScrollPane component that comes with Flash 8 (and 7 I think) has a little bit of weirdness in it when it calculates the desired height of the scrollbar. The vast majority of the time I don't see this, but every once in a while I find that the scrollbar won't let me scroll all the way to the bottom of the content that I've added into the scrollpane. I normally go to LiveDocs and search around on the web a bit and hit it with onComplete() (shhh.. it's not documented or supported so don't use it) and then figure out some workaround.

After digging into a bit more here's what I found - if you move whatever object is the "top" of the content in the scrollpane down then you're going to hose up the height of the scrollbar. Here's an example where I moved the "title" clip down 20 pixels. Scroll down in the scrollpane and notice how the bottom of the last object gets cut off.

 

Now.. some of you might be saying something like "oh, you just need to use invalidate() on the scrollpane" or "use onComplete()" or something along those lines. Bah! It's not an issue of the scrollpane getting updated. The problem is the scrollpane looks at the height of what is loaded into it and doesn't look at the _y value of the topmost object in the content. Don't believe me? Here's the same SWF and all I did was place a little red shape at the top and not move it. The red shape begins the height of all objects in the scrollpane and so the height of the scrollbar is calculated correctly. And that allows you to scroll all the way to the bottom.

This only applies to the "v2" components.. and there may well be other workarounds or fixes out there.. but I hope it helped you.

This also applies to horizontal placement of the loaded clip btw.. so your content can get cut off on the right side too.

Oh.. if you want the FLAs.. 1 and 2

I'm hopefull that the V3 components are in good hands and won't have this little glitch..

 

 

created on a nice sunny afternoon of September the 26th in the year two thousand and six.