Client/User Idle Timeout Component

I was looking around in the net for an effective client/user IDLE TIMEOUT mechanism. My requirement was very simple – The UI should time-out if the user is idle for more than 5 minutes. In geek terminology, IDLE translates to zero keystrokes and zero mouse movements.

After googling around and then spending some time at Flexcoders, I came across a link from the CFML site – an example for just what I wanted to do 🙂 . So, we went and took that script and added a few bells and whistles to it before converting it into a re-usable component. And here’s what we have :-

The ClientIdleTimeOut component can be added to an application using-
<flexed:ClientIdleTimeOut id="TimerId" onTimeOut="FunctionPassedFromCaller" listenKeyStroke="true|false" listenMouseMove="true|false" timeOutInterval="1" confirmInterval="1" />
Now, when the application starts, the timer starts. If there is no user activity for the timeOutInterval specified, then a timeout warning pops up and stays up for confirmInterval time. Once the confirmInterval has been crossed, the application is timedout. At this point, three actions happen – 1. The application is disabled; 2. The FunctionPassedFromCaller set to the onTimeOut attribute is fired; 3. An event of type appTimedOut is dispatched. We can have a listener for this event and fire our actions at this point apart from the onTimeOut function.

So, thats what the ClientIdleTimeOut does 🙂 . Check it out. Enjoy

PS: The Demo has an idle timeout for 3 mins. and a warning prompt of 2 mins. The ASDocs provided is more of an experiment 😉 .

[ Demo | Source | ASDocs ]


26 Responses to Client/User Idle Timeout Component

  1. danielneri says:

    Great thanks this will come in handy 🙂

  2. asela.w says:

    good work dude!

  3. unhitched says:

    what I’m trying to do is build a standalone swf file (not run from a html page) which gets the User/System Idle Time and use this variable in my AS3 code. There are some examples for how to retrieve this in Java & C:

    Windows –
    OSX –

    Can I call Java or C code from AS3 and retrieve a value?

    Any help would be appreciated.

  4. Sugan Naicker says:

    Great work!

    Sugan (South Africa)

  5. Royce says:

    Flex already provides an IDLE event, FlexEvent.IDLE. It is dispatched when there is no keyboard or mouse events.

  6. Raihaan says:


    Thanks for this. It works like a charm. Saved me the trouble of having to figure this out on my own 😉

  7. Peter says:

    all those links give me 404’s, even snap photo shows a 404

  8. Phlak says:

    This sound like just what I need but the source link is broken 😦

  9. Tamil says:

    I am not able to access both demo and source. kindly help me

  10. Joseph says:

    The Demo, Source and ASDocs are unavailable. We’re all getting a 404. It would be nice to have this component.

  11. Olutayo Oyawale says:


    I tried to use the component in my application, but I get error message (The prefix “flexed” for element “flexed:ClientIdleTimeOut” is not bound).

    Do I have to import a specific object or class?

    Thank you in advance.

  12. Luis Mendez says:


    i have a question?…where can i download the component, because it doesn’t exist in

    Thank you in advance

  13. Pingback: Temporizador de inatividade do usuario » Bruno bg + ADOBE FLEX

  14. I like this concept. I visited your site for the first time and simply been your fan. Continue to keep writing as I am gonna come to read it daily!!

  15. Sreedevi. says:


    ” I tried to use the component in my application, but I get error message (The prefix “flexed” for element “flexed:ClientIdleTimeOut” is not bound).

    Do I have to import a specific object or class? ”

    Was there any solution for this ?

    Even I am getting the same error.
    Please anyone help me in this regard.

    Thank you in advance.

  16. amit says:

    While trying to compile the mxml file, it could not identify “flexed” tag. could you please tell me how to make use of the above-mentioned tag?


  17. Gary1977 says:

    Does it work for tabbed browsers?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: