Can someone help me with this code?
I'm trying to figure out how to scroll an MC up and down based on the position
of a scrollbar.
What am I doing wrong with this code?
I'm finding the ratio between how tall the content is (currentChild) and how
tall the scrollbar is:
scrollRatio = currentChild._height/scrollBar._height;
Then changing the position of the content depending on where the
scrollBar.slider is:
currentChild._y = (scrollBar._height - scrollBar.slider._y)*scrollRatio;
The result of this is the content is not visible until the scrollbar slider is
most of the way down it's length, and then the content doesn't scroll far enough.
As you can see I've currently got the slider clip as a child of the scrollBar
clip - should I bring it out to the same level?
Anyone got any ideas?
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders