Change Time Delay / Timeout on touchscreen for single frame
Hi,
I have an interactive touchscreen with 7 screens. If the screen is idle for more than two minutes the screen reverts to the home/start screen.
This is the code on the home/start screen:
var root = this;
var delay = 120000;
var timeout = 0;
function main()
{
root.stop();
root.startButton.on("click", start);
anim_container.addEventListener("mousedown", wake);
anim_container.addEventListener("mousemove", wake);
}
function start(e)
{
root.gotoAndStop(1);
}
function wake(e)
{
clearTimeout(timeout);
timeout = setTimeout(idle, delay);
}
function idle()
{
root.gotoAndStop(0);
}
main();
-----------------------
I need to add a 4 min video to one of the frames, but the timeout kicks in at 2 minutes. I can increase the timeout but this isn't suitable. Is there any way to reset the delay time just for the video frame ?
Any help appreciated
Thanks
M
