A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Inactivity Detect?? (please Help!)

  1. #1
    Member
    Join Date
    Apr 2001
    Posts
    63

    Inactivity Detect?? (please Help!)

    Hello there!

    I have a flash piece currently being run on a touch screen monitor. No biggie, since your finger basically becomes the mouse.

    BUT, here's the deal. The first frame is a "Touch Here to Start" button. Touch it and it moves you into the main content. So far so good. The client would like the screen to go back to the Touch Here to Start frame after say 5 minutes of inactivity.

    I hadn't seen anything previously on this, does anyone have an example or can someone help me out???

    Thanks!
    Last edited by RickHoeye; 01-02-2007 at 05:51 PM.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    You'll need a timer that starts counting down seconds from 5mns to 0 onMouseMove()
    you can use setInterval() for that timer

    gparis

  3. #3
    Member
    Join Date
    Apr 2001
    Posts
    63
    Hey thanks for the reply!

    Do you happen to have an example or could you expand on that a little? I'm not exactly sure where to add the scripting.....

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    add the code on the content frame of the main timeline.

    code:
    this.onMouseMove = function() {
    displayTime = 60;//that's for 1 minute
    };
    displayTime = 60;//that's for 1 minute
    countDown = function () {
    displayTime--;
    if (displayTime == 0) {clearInterval(timer);
    trace("Times Up!");
    }
    };
    timer = setInterval(countDown, 1000);



    of course the trace is just for demo purposes. Enter your gotoAndStop() there instead.

    gparis

  5. #5
    Member
    Join Date
    Apr 2001
    Posts
    63
    Great - I appreciate the help!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center