This content has been marked as final. Show 4 replies
I modified things a tiny bit:
var trace = window.runtime.trace
var TimerEvent = window.runtime.flash.events.TimerEvent
var Timer = window.runtime.flash.utils.Timer
theTimer = new Timer(3000, 0);
<input type="button" onClick="timerInit()" name="startTimer" id="startTimer" value="Start Timer">
I hope it helps!
I was able to get the timer event to work.
What is the difference between air.Timer and window.runtime.flash.utils.Timer?
I think I know the difference now. Apparently air.Timer is just an alias for window.runtime.flash.utils.Timer.
You can use the short versions of things such as air.Timer as well as a lot of other things if you include AIRAliases.js in your project.
I realize this post is old, but to add to info on the topic, if you want to reuse the timer,
...as it sets the timer to zero, and stops the timer.
and don't remove the listener.