You can start a timer or listen for enterFrame events. I’ve found enterFrame to be more reliable.
Is this what you are looking for?
monitor = new URLMonitor(new URLRequest("http://localhost/gateway.php"));
monitor.pollInterval = 5000;
I use it to poll a server every five seconds and when there is a change is status to connected it triggers the onStatus function I have defined elsewhere. Learned it from Lynda.com's videos...
Thanks for your reply's but it isn't really what I'm looking for.
Both your approaches will work on Android but on iOS the application freezes when it is moved to the background so timer events or monitor events will not be processed (on android the app is freezed when the screen is turned off). As the goals of multiplatform development are a) reduce development cost and b) give the user the same experience on all platforms, it seems wrong to me to start adding functionalities that are only supported on one platform (even if that platform is by far superior to others...).