A better way to do this

Lets start with this:
http://sss-mi.com/1.0/test.html

The movement of the bar is basically the desired effect that I want, but it seems like there should be a better way to do it. Essentially I am happy with how it works in this example, but would rather not have all the empty space below it. Also I would like the movement points not necessarily a specific value, so I could have dynamic content and it would just move below loaded content

Right now I just have it all flash, with a stage height of 1000 so it moves up and down when you click a particular section.

At first I tried using javascript with AS to change the height of the swf, with this result:
http://sss-mi.com/1.0/resize.html
the movement works, but it gets cut off, because if it resizes first then moves its fine if the bar is sliding down, but if its sliding up, the animation gets cut off, and vice versa.

Did that make sense? Maybe not…any thoughts are appreciated,
Thanks!