Old 28-02-2006, 19:54   #1 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
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.
  Reply With Quote
Old 01-03-2006, 05:02   #2 (permalink)
d*d
Senior Member
 
d*d's Avatar
 
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;
}
}
  Reply With Quote
Old 01-03-2006, 12:19   #3 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
Nice. Thank you
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8