Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-11-2005, 08:29 AM   #1
Registered User
Join Date: Jun 2005
Posts: 16
Default making a window close after specified amount of time

hi. how can i go about making a window close after a specified amount of time in flash mx 2004? after pressing a button named "end" on my page, i have an animation i want to play, and as soon as it's through playing, i want the entire window (website) to close. the window is not a pop-up, it's actually the website itself. i want it to stay open for about 4 seconds after pressing the button before it all closes down. any help would be very much appreciated. thank you!

p.s.- forgive any ignorance on my part in the forming of this question, or the wording used within. i know very little about flash at all. my girlfriend is making a webpage for my band and is having a hard time figuring some things out. so i'm trying to help her. she will completely understand your answers.

Last edited by bullettobinary; 06-11-2005 at 09:39 AM.
bullettobinary is offline   Reply With Quote
Old 06-11-2005, 10:17 AM   #2
Registered User
Join Date: Jun 2005
Posts: 77


try a variance of this.

ActionScript Code:
on (release) {     countFor = 4;     myTimer = setInterval(countDown, 1000);     function countDown() {         countFor--;         if (countFor<=0) {             trace("close");             getURL("javascript:window.opener=self; window.close();");             clearInterval(myTimer);         }     } }

dixieflatline is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:15 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.