| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Senior Member
|
ActionScript
Whats the AS for scrolling text fields that makes the text scroll at a faster rate at first then "slow into place". I know this has to do with dividing the total distance the text needs to travel by 2 consciously, but I cant get it. Cheers. |
|
|
|
|
|
#2 (permalink) |
|
Senior Member
Join Date: Oct 2004
Location: Bristol
Posts: 3,155
|
Stick this in a setInterval function or in an onClipEvent(enterFrame) handler mx= xFinal //xFinal=final _x position if (mx<_x) { dx=_x-mx; } else { dx=mx-_x; } moveSpeedx=dx/10; if (mx<_x) { _x=_x-moveSpeedx; } else { _x=_x+moveSpeedx; } } |
|
![]() |