Q:

Flex timer delay changer?

I need help with the following...
var timer:Timer = new Timer(x);

basically x is an array...
when timer.start() is invoked
it runs, the first count is 1000 ms, then the second 800 ms, and the third 6200 ms and so on. In other words, it's a dynamic change in the delay and not a continuous delay of x ms.
How can this be done? Any examples would be greatly appreciated.
Thank you in advance

A:

var timer:Timer = new Timer(delay);
timer.addEventListener(TimerEvent.TIMER, timerHandler);
timer.start();
function timerHandler(e:TimerEvent):void
{
   timer.stop();
   if (timer.currentCount == 1) {
      timer.delay = 800;
   } else if (timer.currentCount == 2) {
      timer.delay = 6200;
   } else {
      //other conditions
   }
   timer.start();
 }

