Domanda

In a Flex 3 application I need a way to monitor activity/inactivity of a user on the application.

If the user doesn't do anything for 30 min, I just need to show a message for him.

I this possible in Flex 3 / Action Script 3 ?

Or do I need to create a scheduled event which triggers on a given time frame ? Is that possible also ?

Any example is greatly appreciated !

È stato utile?

Soluzione

  1. create a variable to save the last operation time named LAST_OPE_TIME on the application.
  2. add mouse event listeners on the stage, and update LAST_OPE_TIME in the events handler.
  3. add an ENTER_FRAME event listener on the stage, and in the event handler, use getTimer function to get the current time, and compare to LAST_OPE_TIME.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top