3

在SWF嵌入background.html和background.html之间使用ExternalInterface可能吗?在Chrome扩展程序背景页面上使用ExternalInterface可能吗?

当creationComplete时,调用ExternalInterface.call(“alert”,“test”),但没有任何反应。

当background.html作为文件打开时,它可以工作。

SWF和bacground.html位于相同的目录中。

SWF添加到Global Security Panel和flash.system.Security.allowDomain(“*”);

Google Chrome是最新版本。

回答

0

您必须为外部接口调用一个函数。

尝试:

ExternalInterface.call("function setLocation() {alert("Hello!");}"); 

或对您background.html,没有工作的,其余为你一个js功能。

+0

Flash Player怎么样? 如果你有Pepper Flash,它可能是问题的根源。 – 2014-03-13 20:58:49

相关问题