Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ambient

macrumors member
Original poster
Apr 21, 2007
60
0
Hi, just want to pick the brains of you flash pros out there.... Interested in doing something similar to this site.. www.72.com.au/.. just wondering about the navigation - im guessing it is a MovieClip controlled by the scrollRect command in Actionscript.. How would i also achieve the easing effect ie. how it slows down and eases into the final page.

Anyway, if anyone could point me in the direction of a tutorial or even confirm what actioncript commands would be the best to use I would be very much greatful (i havnt been able to find any similar tutorials on the internet).
 
Ease in effect is simple, every time when you increment the x or y coordinates, just add/subtract based on the difference between the destination x or y coordinates. something like this:

currentX = currentX + (destinationX-currentX)/rate_of_increment;

You might want to add in a limiting factor to stop the equation from going on infinitely (depends on your initial and rate values).
 
Ease in effect is simple, every time when you increment the x or y coordinates, just add/subtract based on the difference between the destination x or y coordinates. something like this:

currentX = currentX + (destinationX-currentX)/rate_of_increment;

You might want to add in a limiting factor to stop the equation from going on infinitely (depends on your initial and rate values).

Ok thanks for that... lifesaver.. Do you think using scrollRect is the best way to scroll the MovieClip?? you know of any other ways?
 
Ok thanks for that... lifesaver.. Do you think using scrollRect is the best way to scroll the MovieClip?? you know of any other ways?

dont worry about me.. i got it sorted.. using basic AS duuh ahah
 
it seems you have this sorted now, but i was going to say that there are built in easing functions in motion tween...

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;

var tw:Tween = new Tween(movieClip,"_y",Strong.easeOut,movieClip._y,NewPositon,NoOfSeconds,true);

like that i think? youd need to double check syntax as thats off the top of my head...

edit* forgot to say that this is of course AS2...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.