Return to Kroll Web Design home page Flash tutorials

« Return

ActionScript 3

Scrolling Text

This uses a timer event and a mask to scroll text.

Download the FLA file

var myTimer:Timer = new Timer(100);
myTimer.addEventListener(TimerEvent.TIMER, scrollText);
myTimer.start();

function scrollText(myEvent:Event):void
{
	if (text1_mc.y < -360)
	{ text1_mc.y = 20 }
	else
	{ text1_mc.y -= 1; }
}