Copy link to clipboard
Copied
Simply put I have a pop-up box that appears on a setInterval timer.
However, I need this pop-up to also run on a timer that if nothing is pressed on the pop-up it goes to another frame.
This is the script I have so far:
popup._visible = false;
var timer=setInterval(timeOut,6000);
function timeOut():Void{
_root.popup._visible =
!_root.popup._visible;
clearInterval(timer);
}
Any help for this to then time again and go to another frame would be appreciated
var timer=setInterval(timeOut,6000);
var gotoTO:Number;
function timeOut():Void{
_root.popup._visible =
!_root.popup._visible;
clearInterval(timer);
clearInterval(gotoTO)
gotoTO=setTimeout(gotoF,3000);
}
function gotoF():Void{
_root.gotoAndStop("presentation_frame1"); // label this frame
}
Copy link to clipboard
Copied
:
//when something is pressed, use:
clearInterval(timer);
timer=setInterval(timeOut,6000);
Copy link to clipboard
Copied
Thing is I don't want anything pressed at this point, when the pop-up is visible. I am simply looking for it to hold for x amount of seconds and then goto frame 1 (start of the presentation)
Copy link to clipboard
Copied
var timer=setInterval(timeOut,6000);
var gotoTO:Number;
function timeOut():Void{
_root.popup._visible =
!_root.popup._visible;
clearInterval(timer);
clearInterval(gotoTO)
gotoTO=setTimeout(gotoF,3000);
}
function gotoF():Void{
_root.gotoAndStop("presentation_frame1"); // label this frame
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now