3 Replies Latest reply on Aug 13, 2006 9:37 AM by kglad

This should be a simple one, but the math is boggling my poor brain. The worst part is I know it is simple High School math. But its geting blurry the more I look at it.

I think there should be a simple math equation to make a reverse scroller for an image gallery.I have removed the paths to make this easier to look at.

Image gallery is nested in a MC called Thumb_Slide. It has a variable size.

I have a dragable MC slider to the left called dv, its range is -255 top to -150 bottom.

This is wrong, but I am using:
onEnterFrame = function(){
Tall = Thumb_Slide._height;
current = dv._y;
//Thumb_Slide._y = ((current / _root.Tall) * 10;
}

I thought it should be x = (dv._y *155)/heightofGallery but that doesnt work.

Both of these create a situation where when the slider goes down, the gallery goes down. I want the gallery to go up. And the numbers are off.

Any mathmatician who could help woud be appreciated.

Vince
if you want your movieclip Thumb_Slide to range from Thumb_Slide._y=0 to Thumb_Slide._y=Stage.height-Thumb_Slide._height , set up two equations in two unknowns where:

Thumb_Slide._y=a*dv._y+b, and you need to solve for a and b. specificially,

Stage.height-Thumb_Slide._height=a*(-150)+b;
0=a*(-255)+b;