Hi Guys, first post here, I have tried to search but it is always quite difficult. Sorry for troubling you with simple questions!
I am designing something that has a front page, then a menu and then individual pages. These pages are all static (apart from a couple having a moving graphic)
What I want to do is if you get to one of the individual pages, after a certain amount of time (maybe 3 minutes) it goes back to the front page.
Is there an actionscript command that you can use for this? Or do you have to do it with a number of frames so it "plays" the static page for a while then moves on. *note* I don't want it to move to the next page, I want it to go back to the front page.
you can user a Timer. once you get to the page that you want to be redirected from after a certain amount of time set the Timer, add a TimerEvent.TIMER_COMPLETE event listener to it (and start the timer - i have forgotten that once or twice) and tell the handling function to gotoAndPlay(1);
Hi this thread has really helped but I am having a problem.
I made a timer to go back to frame 1 after a certain amount of time (ie there is 'next' and 'prev' buttons, so if nothing is pressed. This timeout works.
My problem is that even if the next frame is gone to, the timeout timer keeps going and goes back to frame1.
All my frames start with
------------
stop();
------------
Here is my timer code
// Reset Timer
var timeoutTimer:Timer = new Timer(5000, 1); // 5 second timeout
timeoutTimer.addEventListener(TimerEvent.TIMER, reset);
timeoutTimer.start();
function reset(event:TimerEvent):void
{
gotoAndStop(1);
}
------------------------------------------
How can I make the timer stop when a different frame is selected (and start the timer actually, but Im pretty sure timeoutTimer.start(); will suffice.