Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to close the falsh using a button 1

Status
Not open for further replies.

maddymadhans

Programmer
May 9, 2003
13
KR
hi
i want to close the flash window by clicking the close button how to do it

plz help me

thank you
 
The browser window, online?

Regards,

cubalibre2.gif
 
Code:
on (press) {
    getURL("javascript:window.close()");
}

Regards,

cubalibre2.gif
 
thanks frozenpeas, that works great as a standalone projector exe but i cant seem to get that same button to work as swf file when launched from a web page.

any ideas why it would work as an exe but not a swf? thanks

 
Yes, that will work on only the standalone projector.

If your swf is embedded in an HTML page you launched as a popup, you will have to use the method oldnewbie suggested above.

frozenpeas
 
Using the script:

on (press) {
getURL("javascript:window.close()");
}
I get a pop-up stating "The Web page you are using is trying to close the window.
Do you want to close this window?
Yes No"

How do I get rid of that and just close the window?
 
The message will appear unless the window was opened with JavaScript.

frozenpeas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top