Slider tute math problem

yo,
i don’t understand the math behind the slider tute in the flash 5 section of kirupa’s tutes. That is, i have a movie that is 650 by 500 that i want to slide. can someone explain what i have to change in the formula to get this to slide the exact same was as in the tute? i tried changing some of the numbers and got it almost perfect but ive been doing it with trial and error and its not the most efficient way

thanks
P

Well let us put it this way…

You have 4 blocks. Each block is 100 pixels wide.

The equation is…

_root.xnew = _root.mask2._x +(4-1)*100/2;

See any correlation?

hey lost,
got the hint, nudge nudge, thanks for the informacion, i will apply it I give you a hearty handshake (seriously though, thanks)

see ya on the flip side…medium rare

P

:slight_smile: No problem man. I myself have never done the tutorial, so I don’t know how right I am, but to me when I map it out in my head I get what I posted last time… but my head isn’t always right :stuck_out_tongue:

I hope it works out for you :slight_smile:

Yeah, that equation isn’t very clear, hue? Actually, the problem comes from the fact that the registration point of the blocks are in their middles, hence the “/2” (would be easier to align them on the left).