-
is it possible to close an html window with a button, if the button is from a (loadmovie) swf file? or do i need to put that exit button in the main swf and not in a loaded movie file?
-
use the get url
getURL ("javascript:closewin");
and in your html head make a javascript function called closewin
window.close();
-
feel a bit stupid asskin this, but could you please post the javascript code for the html that i need to paste into the page head...?
-
Code:
<script language="javascript">
<!--
function closewin() {
window.close();
}
//-->
</script>
there ya go..
-
well, i aparently is going to the java, but instead of closing the window, it loads a page with:
... function closewin() {
window.close();
}
and the java function in the IE address line....
any suggestions?
-
ok:
your button needs this code:
---------------------------------------
on (release) {
getURL ("JavaScript: closewin();");
}
----------------------------------------
and your html needs this javascript:
----------------------------------------
<html>
<head>
<script language="javascript">
<!--
function closewin() {
window.close();
}
//-->
</script>
</head>
<body>
</body>
</html>
----------------------------------------
it will prompt the user with a alert box saying the webpage you are viewing is trying to close a window!
Do u want to close this windo -- yes? no?
this is normal...from what i know it s impossible to do it without this thing to pop up...for security reasons...
annyway hope it helps....
-
YES! thank you!
and the 'do you really wanna close windows' thing is great cause it'd worked into my design...
oh, and by the way... if the button with the actionscript is in a loaded movie, and the javascript is in the main html that contains the flash that contains the (loaded) movie, the command still works!! (this ALSO works into my design)
so thank you again for all your help!!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|