View Full Version : about close browser
paopei
July 23rd, 2002, 08:56 AM
:asian:
anyone knows about closing flash player using action script ?
i really want to get the information immediatelly.:ninja: :P :evil: :x :)
Iammontoya
July 23rd, 2002, 12:55 PM
use fscommand
paopei
July 24th, 2002, 01:19 AM
Originally posted by Iammontoya
use fscommand
i don't know how to use fscommand() and javascript .can u give me the complete script
arigato gozaimasu
JohnLawton
July 24th, 2002, 06:16 AM
Hi
I have used this in the past.
on (release) {
getURL ("javascript:window.close()");
}
This is the script as attached to a button. I guess you could put the same getURL ("javascript:window.close()") as a frame action.
The downside to this is that if the window was not launched from another browser, you will be prompted "Are you sure you want to close the window", but apart from that, it does the job a treat.
If you discover another way, which doesn't give a prompt, I'd be delighted to see it
Cheers
John :)
jsk
July 24th, 2002, 06:21 AM
If you don't want the close alert then use javaScript to open the window.
JohnLawton
July 24th, 2002, 06:38 AM
Originally posted by JohnLawton
on (release) {
getURL ("javascript:window.close()");
}
Please note that although I posted the above without a space between the words "java" and "script", for some reason they are appearing with a space. So make sure you get rid of that space before you key it in.
Also, JSK is correct, if you launch the window using JavaScript originally, then you won't get the warning message re closing the window, but that assumes that you have launched the movie window using JavaScript - but that may not always be the case.
John :)
paopei
July 24th, 2002, 08:27 AM
thank you for you guys!!!!!!!!!
i've tried your code and it worked!!!!!
doumo arigato gozaimasu!!!!!!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.