tags:

views:

105

answers:

1

I have an application in which when i click on a particular tab an HTTPService having id="service" is sent. This service calls a php file which in turn extracts data from a table and return as xml string to Flex. Flex then use DataGrid's dataprovider attribute to show the data in the dataGrid.

Can i have a functionality of a timer which will call the HTTPService again and again after each 5 minutes?

+1  A: 
var timer:Timer = new Timer(5 * 60 * 1000); //time in milliseconds
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.start();
function onTimer(e:TimerEvent):void
{
  service.send();
}
Amarghosh
Thanks 'again' :)
baltusaj
You are welcome. Btw, have you ever bothered to check what those up/down arrows near the answers mean? http://meta.stackoverflow.com/questions/7237/how-does-reputation-work-on-stackoverflow
Amarghosh