jeudi 9 février 2017

ActionScripts 3 Timer event issue

I'm trying to use some code for a Timer and do something after timer event done, but code doesn't work properly.

import flash.net.*;
import flash.events.Event;
import flash.display.DisplayObject;
import flash.utils.Timer;
import flash.events.TimerEvent;

var STATE_TIMER:Timer = new Timer(6000,100); 
STATE_TIMER.addEventListener(TimerEvent.TIMER, timerListener); 
function timerListener (e:TimerEvent):void 
{ 
  trace("SMS_SENDER(); Timer Executed."); 
  SMS_SENDER();
} 

STATE_TIMER.addEventListener(TimeEvent.TIMER_COMPLETE, timerDone);
function timerDone(e:TimerEvent):void{
trace("Timer finished!");
}

Output:

Scene 1, Layer 'STORE2', Frame 77, Line 15, Column 30   1120: Access of undefined property TimeEvent.

Aucun commentaire:

Enregistrer un commentaire