22 Comments


  1. Thanks for your post, currently I will be implementing the same solution to track user’s inactivity in Flex app based on FlexEvent.IDLE event

    And I find mx_internal::idleCounter to be useful too!


  2. Thanks for the post, it really helps. There is some methods getting current time at every FlexEvent.IDLE, but idleCounter is better.

  3. Hans

    Hi,
    This is very useful, but has a problem. It works perfect until you show a
    TittleWindow, if you move the mouse over the window, the counter don’t restarts, I
    mean, the FlexEvent.IDLE event is not fired when you have opened a TitleWindow.


  4. Really very great tip!
    This is the best solution instead add a listener in the Application for MouseEvent.MOVE combinated with getTime() values.

    Congrats and thanks!

  5. Royce

    Thanks a lot for this. I was using a similar solution but recently discovered an intermittent flaw with it. Using the internal idleCounter seems to have resolved my issue.

  6. Dylan

    Thanks for the post, it really helps. I am from China, I also have only recently started to do about flex + Java project, have a problem, the unified session expired on error handling, I want to use your this way, but not very familiar with, there’s no better way to solve, thank you, can send my mailbox, in times thanks! Hope to know you!

  7. Dylan

    Feels good, I wrote a tested and also add to the project

  8. MakubexDW

    Simple and effective … best solution .. thx

  9. gromitski

    Hi

    What happens, when a user changes a tab in his web browser? I have noticed that an idle event stops until the tab is changed back to the app. Is there a way to change this behavior?


    1. Not sure. Probably not as with FP10.1 there are resource management behaviors such as this built into the FP/Browser relationship.

  10. gromitski

    Actually I was wrong. An idle event of course goes on and detects movement in other tabs, so I had to play around with activate and deactivate events to start/stop an idle event.

  11. Mumtaz Ahmad

    Hi Joseph
    I am newbie with Flex. I followed your example on Flex.IDEL and it worked for me. Thanks a lot. But in QA I am having some weird things.
    1. When browser window is minimized, this event doesn’t trigger.
    2. When some flash contents are running in same or different browser, this event sometime fires and sometimes not.

    Can you help me out in figuring out why this is happening and how I can fix it.

    Thanks in Advance.
    Regards,


    1. I believe this could be the fact that Flash Player will now throttle when placed in an inactive tab within the browser. I would assume minimizing the browser would have a similar effect.

      1. Arnab

        This doesn’t work if the browser is minimized

  12. Be

    For more then one minutes it’s not firing the idel event properly, why so?

  13. umanath

    A FlexEvent.IDLE event will dispatch every 100 milliseconds , doesnt hold true in flash player version after 10.1. depend on the frame rate it varies. Starting FP10.1 when you minimize window or FP goes into background process, the framerate reduces to 2 FPS.

    A FlexEvent.IDLE event will dispatch every 100 milliseconds holds true only for framerate = 60.

    if the framerate is 2 FPS, it dispatches every 500 millisecs. this means idleCounter is incremented 5 times slower than while FP was in foreground.

    1. Eugene Bovkun

      I have the save problem with long time idle detection. Events generates in 5 times slower.

  14. Smith

    Is it possible to prevent the frame rate from dropping to 2 FPS when the browser is minimized?
    And, can I somehow prevent BlazeDS from dispatching a DuplicateSessionDetected error?

  15. Smith

    Thanks a lot for your input quick input
    Unfortunately, I’m working Flash Builder CS5 and I can’t seem to open the Throttle.fla file.
    Is there a CS5 version available?

    Thanks a lot again.

  16. Len

    I need to track when the user has been idle in my application even when they switch to and work in another tab. Is this possible using Flex? What is the best recommended solution to handle this?

    Thank you

Comments are closed.