I have a use case that sounds simple but I am not certain how to code it. The client wants data on the page to refresh periodically and automatically but only if a user is viewing the page that displays the data. So if they click on a another tab, the expensive updates will stop. If they click back on the tab updates will again initiate. The client doesn't want to use messaging since they don't want updates to occur unless the user is actually viewing the page.
The problem I see is knowing when a component is being displayed and when it is not. I have knowledge of the display list and how visual components are created etc. but I am by no means a Flash/Actionscript expert. I do not know if and what events might be fired to help out. I have tried listening for ACTIVATE/DEACTIVATE, RENDER, FOCUS_IN/FOCUS_OUT events but no luck. Is there any way to tell when a component is visible/not-visible to a user? Any ideas? Thanks! Jim