Copy link to clipboard
Copied
Dear Adobe-Community,
I'm developing a tiny infotainment system for use on an touchscreen monitor without the possibility to use a keyboard. The only way to make an input is to use the finger/mouse and to klick on the provided buttons in the flashplayer fullscreen.
If the user goes away after spending some time with my infotainment, the system remains at that point where the user has left it. To provide the next user the main menu after a while of inactivity I appiled a timer that navigates automatically to the frame in the timeline, where the mainmenu animation starts. That works so far (only the timer without a listening for inactivity).
My problem is that I have to monitor if a visitor is using the infotainment and after every action (whereever in the timeline) the timer has to be reset to 0. The reset itselft is simple and works too but I don't know yet how to code that a mouseclick anytime happened anywhere in the timeline to give a signal to my timer for reset.
There are a lot of eventListeners for the different buttons active at any time but not everywhere the same.
Can anyone give me a hint or an example?
Thanks a lot!
Best regards
Chris
One way would be to insert a timer reset function call in every event handler function that the event listeners use.
If the program relies only on mouse input then you could also look into setting up event listeners for MouseEvents. MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference
Copy link to clipboard
Copied
One way would be to insert a timer reset function call in every event handler function that the event listeners use.
If the program relies only on mouse input then you could also look into setting up event listeners for MouseEvents. MouseEvent - Adobe ActionScript® 3 (AS3 ) API Reference
Copy link to clipboard
Copied
Hi Ned,
thanks a lot for the quick reply.
That works over the whole timeline so I can avoid to add a listener to every screen:
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
trace("mouseDownHandler");
}
Thanks!!
Chris
Copy link to clipboard
Copied
You're welcome