Inactivity

Kind of class:class
Inherits from:EventDispatcher < CoreObject
Version:08/07/07
Author:Aaron Clinger
Classpath:org.casaframework.util.Inactivity
File last modified:Sunday, 19 August 2007, 13:43:36
Detects user inactivity by checking for a void in mouse movement and key presses.
Example:
function onInactive(sender:Object):Void {
    trace("User has been inactive for 5 seconds.");
}

function onReactive(sender:Object):Void {
    trace("User has resumed activity.");
}

var inactivityDetect:Inactivity = new Inactivity(5000);
this.inactivityDetect.addEventObserver(this, Inactivity.EVENT_INACTIVE);
this.inactivityDetect.addEventObserver(this, Inactivity.EVENT_REACTIVE);
Events broadcast to listeners:
onInactive = function (sender:Inactivity) {}
onReactive = function (sender:Inactivity) {}

Summary

Constructor
Instance properties
Instance properties inherited from EventDispatcher
Instance properties inherited from CoreObject

Constructor

Inactivity

function Inactivity (timeUntilInactive:Number)
Creates Inactivity object, and defines time until user is inactive.
Parameters:
timeUntilInactive:
The time in milliseconds until a user is considered inactive.
Events broadcast to listeners:
onInactive = function (sender:Inactivity) {}

Class properties

EVENT_INACTIVE

static EVENT_INACTIVE:String = 'onInactive'(read,write)

EVENT_REACTIVE

static EVENT_REACTIVE:String = 'onReactive'(read,write)

Instance methods

destroy

function destroy () : Void