Callback in FF
Hi all,
Here is my second post. My environment is:
Win7 pro 64bit. FireFox 11.0. Flash Player 11.1.102.63. Following code works in IE8 but not FF, can someone have some input?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
var f32=function f32(p) { alert(p) };
(function(){
var f30=function f30() {
window.setTimeout(f33, 2000 }
var f33=function f33(){
var a=document.getElementById("testff");
a.f33() }
f30();
})();
</script></head>
<body>
<div id="test">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"
width="215" height="318" id="testff" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="testff.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src="testff.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="215" height="318" name="testff" align="middle" allowScriptAccess="always"
allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</div></body></html>
------
import flash.external.ExternalInterface;
flash.system.Security.allowDomain("*");
startTest();
function f0():void {
ExternalInterface.call("f32", "One");
}
function startTest():void {
ExternalInterface.addCallback("f33", f0);
}