Hi evilpaul,
I think you overlooked my last edited post
.Actually, i misunderstood your issue and thats why ask you to use fscommand2. Fscommand2 doesnt even work with AS 2 if u r embedding swf into a WRT. So, try these things :
1- Try this actionscript for closing your application :
Code:
ExternalInterface.call("eval", "window.close();");
If it doesnt work try :
Code:
public var u:URLRequest = new URLRequest("javascript:window.close()");
OR try this final solution :
-Create a function in javascript i.e inside main.html write this :
Code:
<script language=javascript>
function closewindow (){
window.close();
}
</script>
and then inside Flash , write this AS :
Code:
ExternalInterface.call("closewindow");
2- For security related issues, try exporting your swf under "Access Network Only" settings.
3- Open the main HTML of your WRT and see that whether this <param name="allowScriptAccess" value="always" /> line is there? .It looks like something like this :
Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553548000" width="360" height="640" id="MyFlash" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="MyFlash.swf" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="bgcolor" value="#ffffff" />
<embed src="MyFlash.swf" loop="false" menu="false" quality="high" wmode="opaque" bgcolor="#ffffff" width="360" height="640" name="Finish" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
4- The last thing add this line in your Flash Lite code before using ExternalInterface :
Code:
flash.system.Security.allowDomain("*")
According to documentation, now your widget must have to get closed
and there should be no security issues .Wish u luck
Best Regards,
SajiSoft