clambam
11-07-2003, 05:07 PM
I guess the subject line tells it all. I have Flash popups on a web page I'm working on. I suppose I could add the HTML below the SWF file in my HTML editor, but for aesthetic reasons I'd like to have a "Close This Window" button embedded in the Flash file which would, obviously, close the popup window.
Thanks,
Marc
mysticlighthouse
11-18-2003, 02:03 PM
Set the link in your flash movie to "javascript: closeWin()"... I believe the default should be set to "_self", but make sure that it is set to it anyways.
Then put the following code in the head tag
<script language="javascript" type="text/javascript">
function closeWin() {
window.close();
}
</script>
should work out ok for you... of course you can always change the function to whatever you want... it doesn't have to be closeWin