PDA

View Full Version : Close window from Flash


Octave
03-05-2003, 12:16 AM
Simple question...

How can I close the window on which the flash movie resides?

The flash movie is on a pop-up window and I want the user to be able to close that pop-up from the flash.

thanks

Octave

kickstart1970
03-05-2003, 07:18 AM
put these actions on your button in the pop up window



on (release) {
getURL ("javascript:self.close()");
}

Octave
03-05-2003, 05:06 PM
i'll give it a try...thank you :)

Chilton
03-05-2003, 07:21 PM
Note that if you didn't open the window you're closing, Windows will honk at your user and ask if you really want that window closed. So if you can, open it from inside Flash to begin with also.

-Chilton

Octave
03-05-2003, 10:40 PM
The actionscript works fine on a regular pop-up window but I need it for a chromeless one. An example is at www.misssixty.com when you click EXIT from the flash.

kickstart1970
03-06-2003, 12:16 AM
Try this code:



on (release) {
getURL ("javascript:parent.close()");
}

Octave
03-06-2003, 01:10 AM
yup, that one did the job! thank you

kickstart1970
03-06-2003, 02:26 AM
No problem. :)