Skip navigation
Currently Being Moderated

Server Request based on time

Feb 3, 2011 4:25 AM

Hi,

     I am sending a request to a server. If i didn't get a response i need to send a request once again after 3sec. Like this i have to check for 3 times. If 3 rd time also it fails i need to terminate the request by prompting a msg to customer.

 

Please help me how to do this. I dont know how to send a request based on time that too for only 3 times.

 

 

Kameshwaran A

 
Replies
  • Currently Being Moderated
    Feb 3, 2011 5:11 AM   in reply to A.kameshwaran

    Look into using setInterval() along with a counter variable.  THe setInterval will take care of calling a function every 3 seconds, and the counter will take care of that function recognizing when three attempts have been made.  You can use clearInterval() to shut it down if the attempt is successful before the third time.  Details of usage are available in the Flash help diocuments.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points