PDA

View Full Version : Determining size of a thumb drag on a scollpane


ceeacs2
11-27-2005, 10:11 AM
I have created my own scrollpane component and would like to know how you calculate the size of the thumb drag so it is in relation to content being scrolled.

I know you have to find the difference between the viewable area and the size of content but does anyone have an equation - I also need to take into account zoom factor and size of increment as these can vary - however general equation will do


Many thanks

Suicidal.Banana
11-27-2005, 05:01 PM
I have created my own scrollpane component and would like to know how you calculate the size of the thumb drag so it is in relation to content being scrolled.

I know you have to find the difference between the viewable area and the size of content but does anyone have an equation - I also need to take into account zoom factor and size of increment as these can vary - however general equation will do


Many thanks

movieclip._height = 100;
movieclip._width = movieclip._height * 1.33;

does that help?

if you created the scrollpane from scratch plz look at my treath in the AS 2 section
http://actionscript.org/forums/showthread.php3?t=90086