Link to home
Start Free TrialLog in
Avatar of cheeta_2410
cheeta_2410

asked on

How to use Action Script to close popup html window?

Hi there,

I am having trouble and really need your help.

- I developed an application in flash and I published it as html page as well so that I have a file named "Main.html".
- I made a normal html page that gives users the chance to call a popup window to play Main.html with no toolbar.
- In Main.html I also have a close button, which allows to close flash application, with Action Script. The problem is that I cannot use it to close the popup html window when I want to quit. I tried to put some Javascript code inside the close button but it didn't work...

Please look at the code and suggest me how to solve it.

Thank you.
----------------
In close button in Flash:
----------------
 
on(release)
{
	fscommand("quit");
	getURL("javascript:self.close()");
}
 
 
----------------
In html page that allows popup window:
----------------
 
<html>
<body>
<CENTER><a href=javascript:Launch('Test.html')><img src="thumb.jpg" weight=300 height=300 border=0></a> <p>
Click on the picture to run the Economical Circle.
</p>
</CENTER>
<SCRIPT LANGUAGE="JavaScript"> 
function Launch(page) { 
OpenWin = this.open(page, "Economical Circle", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=920,height=670"); 
} 
// End --> 
</SCRIPT> 
</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Zeffer
Zeffer
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial