PDA

View Full Version : Closing a swf from within a swf


BJack
11-01-2003, 08:30 AM
Now I have searched a lot for a "close"-button.. I normally find ->

ActionScript:

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


This won't work if the swf isn't inside a html document. I am making a swf that is to run on it's own in the macromedia flash player. Attaching the code above will only create a new window that wants to close, doing nothing to the swf itself.

So, any of you guys got a way around that problem?..

hokoga_saeos
11-01-2003, 02:32 PM
ok here is what i have
on(press){
getURL("javascript:self.close()")
}



also this
on(press){
fscommand("quit");
}

try them and see im sure they /1 will work for you !
peace

edit>,i just tried it and this 1 worked for me
on (release) {
fscommand("quit", "close");
}

BJack
11-02-2003, 08:58 AM
Thanks you, it really works.. !.. :D

on (release) {
fscommand("quit");
}

Yeah!..