• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I monitor any eventListener for timeout?

New Here ,
Feb 20, 2019 Feb 20, 2019

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

TOPICS
ActionScript

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 20, 2019 Feb 20, 2019

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

Votes

Translate

Translate
LEGEND ,
Feb 20, 2019 Feb 20, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 20, 2019 Feb 20, 2019

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2019 Feb 20, 2019

Copy link to clipboard

Copied

LATEST

You're welcome

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines