Hey guys, I wrote a simple widget that reads from a rss file. My question is what's a good way to repeat a function every minute? The widget could run up to 8 hours straight..
Any ideas? I'd like to trigger bugsFeed.send(); once a minute.
// create a timer that fires every minute
public var timer:Timer = new Timer( 60*1000 );
public function init():void
// add event listeners
timer.addEventListener( TimerEvent.TIMER, handleTimerEvent );
// start the timer
public function handleTimerEvent( event:TimerEvent ):void
Let me know if that helps...
Yes it does!!
I had read about it but I understood it incorrectly.
I thought new Timer(1000) created an object that lasted 1000 ms only. Kinda like a countdown timer..
thanks a lot!