Is it possible to wait for a response from a URLLoader before continuing execution of code? Yes, I know it’s not directly possible, but is there any workaround?
I tried something like
public function get myProperty():String
{
load_url_request_function();
response = "";
while (response == "")
{
//Do nothing
}
return response;
}
In the “load_url_request_function()” I add an event listener which eventually populates the “response” variable with data retrieved from the URLLoader’s data property. However, the above code hits the 15 second timeout limit (which I actually expected it to do)
I just would like some workaround for this, if anyone knows of any.
I basically want users to be able to access the property without needing to add an event listener for the reply.
Also a “No, Andreas. For the n-th time, it’s not possible!!” reply is acceptable rather that no response.:look: