HOME COMPANY CLIENTS SERVICES CAREERS PLAYGROUND
PRODUCTS

Flash Components
    IdleTimer

Mobile Games
    IQ Champ

ColorPerfect
    Features
    FAQs
    Order

smNetServerControls
    Features
    Screens
    FAQs
    Order

Downloads

View Cart

Terms of Use
Privacy Policy

The IdleTimer is a Flash MX 2004 component that dispatches a "timeup" event when a user has not interacted with the movie for an author settable length of time.

Buy Now $9.99

Demo:

Methods
Start()  Starts the timer.
Reset()  Reset the timer.
Stop()  Stops the timer.
getTimeLeft()  Returns the time left in milliseconds before firing the timeup event.

Inherits all methods from UIObject and UIComponent.

Properties
verbose  Whether the component should display trace messages.
visible  Whether the component should be seen.

Inherits all properties from UIObject and UIComponent.

Events
timeup  Broadcast when the duration time has elapsed and a user has not interacted with the movie.

Inherits all events from UIObject and UIComponent.

Usage

  1. Drag an IdleTimer component onto the Stage and give it an instance name of cpIdleTimer.
  2. Select Frame 1 of the Timeline and, in the Actions panel, enter the following code below the data provider code:
    var oListener:Object = new Object();
    	  
    // KeyDown event listener added manually
    // only needed to respond to key events
    var IdleTimerKeyDown = function() {
    	_root.cpIdleTimer.Reset();
    }
    oListener.onKeyDown = IdleTimerKeyDown;
    Key.addListener(oListener);
    
    oListener.timeup = function(oEvent:Object):Void {
      trace("time ran out");
    };
    
    cpIdleTimer.addEventListener("timeup", oListener);
    cpIdleTimer.Start(10000);
  3. Select Control > Test Movie to test the IdleTimer component.



© 2004 SynergyMedia, Inc. All Rights Reserved. log-in | contact | site-map