|
-
Scrollbar issues
I decided I would try and learn this one without reading any tutorials and see how far I could get.
So far I can get it to almost work using this code:
private function startScroll():void {
//proportion = theText.infotextmc.height / theText.textMask.height;
scrollHere = scrollThumb.y - theText.textMask.y;
TweenMax.to(theText.infotextmc, 0.5, { y:scrollHere});
}
My movieclips are:
theText.infotextmc - this holds the text as its dynamic and uses the autosize code
theText.textMask - the masker always a predifined size and never changes
scrollThumb - this is the scrollbar handle
scrollRail - This is the rail of the scrollbar
Now what happens is that it actually does scroll from 0 but not to the maximum of the textfield. Obviously by looking at the code it doesn't know the height of the text field to actually scroll by. Its only scrolling to the number provided by the scrollHere var. I just cant work out how to feed this info in in a correct formula - i did try with the proportion var but with no luck
Thanks in advance
Mark
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|