Now for your script, I don't usually go that way of doing it so here
is how
I'd probably do it myself:
var scrollRatio = scrollBar.slider._y / scrollBar.scrollTrack._height;
currentChild._y = - scrollRatio * currentChild._height;
I'm not 100% sure but I think this should work. Notice the negative value
for the currentChild._y.
Thanks, I'll see how that behaves.
Well, it's giving me more consistant results across my different clips, but it's
scrolling too far, leaving whitespace at the bottom. Any ideas?
Logically, I think the scrollRatio must be too high, because it's scrolling
further than it should.
I've added an offset because the top of the scrolling area is not the top of the
screen.
var offset = 108;
var scrollRatio = scrollBar.slider._y / scrollBar.track._height;
currentChild._y = (- scrollRatio * currentChild._height) + offset;
I'll write some code to make the offset dynamic later.
To see the script in action, go here - http://fari.kentandangela.com and browse
to Gallery -> Woodcarvings.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders