- Create a dynamic text field on the stage > give it an instance name > embed the font you want to use
- Add the following code in frame one:
var currentCount = 0;
var totalCount = 1000000;
addEventListener(Event.ENTER_FRAME, onEF);
function onEF(e:Event):void
{
currentCount +=1;
textFieldName.text = "$ " + currentCount;
/// If you want to repeat it or you want to do anything on complete count:
if (currentCount == totalCount)
{
//reset the currentCount:
currentCount = 0;
// If you want to stop the counter:
// removeEventListener(Event.ENTER_FRAME, onEF);
}
}