nice..
On 12/04/2007, at 3:31 PM, Matt Chotin wrote:
http://livedocs.adobe.com/flex/201/langref/mx/managers/
SystemManager.html#event:idle
Grab the systemManager from the Application for example and just
add an event listener for FlexEvent.IDLE and away you go.
Matt
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss
Sent: Wednesday, April 11, 2007 8:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [flexcoders]Is there an event that the application
dispatches when a flash swf has not been interacted with for a
certain amount of time?
I don't think there is a predefined event for this.
If i were to do it, in the application scope i would set handlers
for mouseDown, mouseMove and keyDown to monitor activity time
periods with each interaction resetting a Timer object.
regards,
Bjorn
On 12/04/2007, at 12:58 PM, dorkie dork from dorktown wrote:
Is there an event that the application dispatches when a flash swf
has not been interacted with for a certain amount of time?
For example, I have a site that a user has to log into. After they
login if they have not interacted at all with the application is
there a event that is dispatched that I can listen for so I can
log the user out?
If not can I suggest something like this:
<Application inactivityTimeout="10" >
Application.addEventListener(Application.INACTIVITY,
"myLogOutFunction");
public function myLogoutFunction(event:Event):void {
// logoutService.send();
// applicationState.selectedChild = loginState;
// loginMessage.text = "You haven't done anything for 10
minutes. Get back to work.";
}