Closing the browser from a flash button?

Can anyone tell me how to close the browser window when a button in a flash movie is pressed ?

Cheers :nerd:

Hey skidpanda,
Simply add the following line to your button:

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

Cheers!
Kirupa :rambo:

Cheers Kirupa :nerd:

And if it’s your main browser window and you don’t want the alert, try this:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2844&lngWId=2

oo thats nice too, thanks guys :slight_smile:

Hey Eyezberg?

How would i get that instant closer to work ? i opened the source HTML and copied the java part (dunno if it was the right bit) into the geturl of my flash button, I couldnt get it to work tho - i just get an error…

Cheers for any help :nerd:

Here is a browser window component. Drop it onto your stage, fill in the info like:

URL
Width and Height
Centered or not
Fullscreen
Close after x seconds
Scrollbar/Status/Toolbar/Resize yes no

They close with code that was posted prev.

Pretty useful.