;

PDA

Click to See Complete Forum and Search --> : Automatically go back...


thesween
04-23-2006, 08:57 AM
Hello again everyone :)

Imagine this... clicking on a button which takes you to a different page in a KM website... then.. say 10 secs later, the website automatically goes back to the first/home page.. Does anyone know how this would be done?

Thanks
Steve

Chris_Seahorn
04-23-2006, 09:57 AM
I know I say this a lot but it's true. This is just one of many ways to do it.

Place this in any movie on frame 1 and you can send your page back after 10 seconds (adjustable of course ;))


startTime = getTimer();
var total;
onEnterFrame = function () {
if(total==10){
getURL("http://www.something.com","_self");
delete this.onEnterFrame;

}

elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - elapsedHours * 3600000;
elapsed = Math.floor(remaining / 1000);
remaining = remaining - elapsed * 1000;
if (elapsed < 10) {
seconds = "0" + elapsed.toString();
}
else {
seconds = elapsed.toString();
} // end if
total=seconds;

};

thesween
04-23-2006, 11:05 AM
Perfect!! Again, thankyou very much for your help Chris :) It's much appreciated!

Steve

Chris_Seahorn
04-23-2006, 11:08 AM
Anytime Steve.