1 Reply Latest reply on Feb 3, 2011 5:11 AM by Ned Murphy

    Server Request based on time

    A.kameshwaran Level 1

      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

        • 1. Re: Server Request based on time
          Ned Murphy Adobe Community Professional & MVP

          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.