BG Design
07-30-2010, 11:21 PM
'm trying to create a "counter" element that uses a formatted dynamic text box to count up in .1 increments, starting from a specified value.
Here's the code so far:
var counter:Number;
counter = 3.0
counterText.text=(String(counter));
var timer:Timer = new Timer(300);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(event:TimerEvent):void
{
???
}
What I can't figure out is what should go in the function area, to add .1 seconds each time the timer cycles.
Here's the code so far:
var counter:Number;
counter = 3.0
counterText.text=(String(counter));
var timer:Timer = new Timer(300);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(event:TimerEvent):void
{
???
}
What I can't figure out is what should go in the function area, to add .1 seconds each time the timer cycles.