PDA

View Full Version : Close window from flash



VoS
May 26th, 2005, 03:07 PM
anyone care to post the code used in flash and the one needed in the document to close the window.
can be done with javascript and fscommand or what ever its called right?

Thanks

//VoS

the_koriner
May 26th, 2005, 06:41 PM
Hey, I'm not positive - but yeah I think if you're running online you'll need to use getURL and javascript to do it. If you're running from a projector offline, you can use fscommand.

k.

lava
May 26th, 2005, 06:56 PM
I don't think you need fscommand. On a button on flash, all you should need is

on(release){
getURL("javascript:myclosefunction()")
}

and on your HTML, you need something like:

<script>
function myclosefunction(){
window.close()
}
</script>


I haven't tried it out though, but I know I've done it before.

smoothblend
June 13th, 2005, 03:05 PM
on(press){
getURL("javascript:window.close()")
}