View Full Version : close pop-up window with a flash button
pineapple
07-03-2003, 02:16 AM
does anyone know if you can close a pop-up window by clicking a button that's inside the flash swf?
there's tons of tutorials online regarding how to create pop up windows in flash but nothing on how the user can close the whole window.
besides clicking the "x" on the browser window, is there any other way?
one thousand thank you's to the one that can answer.
:crazy:
eyeinfinitude
07-03-2003, 02:20 AM
You can apply this to your flash button, I'm not sure if it would work though.on(release){
getURL("javascript:close()");
}
pineapple
07-03-2003, 02:25 AM
hi! thanks for the quick reply! i'm going to try the actionscript you posted and i also just ran into this one....
on (release) {
getURL("javascript:window.close();", "_self");
}
i'll let ya know which one worked!
cheers!
pineapple
07-03-2003, 02:45 AM
do i also need to put something into the html code to make this work??
fluid_0ne
07-03-2003, 03:13 AM
nope
This doesnt really work effectively cuz it closes the page not the browser window.
Originally posted by electrongeek
[B]You can apply this to your flash button, I'm not sure if it would work though.on(release){
getURL("javascript:close()");
}
but this does. Only I dont like the fact that javascript sends an alert asking u if u want to close. Isnt there a way to bypass this?
on (release) {
getURL("javascript:window.close();", "_self");
}
lbeetles
07-03-2003, 12:44 PM
i think thou when you upload the pages you dont get the alert message that javascript sends.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.