Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Idle Timeout Code

$
0
0

I am hoping to get help with an idle timeout code.  I am creating a short photo book using Adobe Edge Animate and if someone is on Page 3 for longer than lets say 1 minute without clicking to the next page I want to return the the cover image.  As a test I have set the stage for 5 seconds to set an alert if not clicked and its works great!  Unfortunately, this was just a test and I wanted to replace the alert with symbols (the cover image)  but it hasn't worked at all.  Help would be appreciated!

 

Stage Code

var r;

var timer;

 

function doIt() {

  r = confirm ("hello");

  if (r == true) {

  setIt();

  } else {

  //screen saver

  alert("bye!");}};

 

function setIt() {

  timer = setTimeout(doIt, 5000);};

 

Stage.Click Code:

 

clearTimeout(timer);

     setIt();


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>