Google App Engine上的Flash ExternalInterface存在问题 [英] Problem with Flash ExternalInterface on Google App Engine

查看:162
本文介绍了Google App Engine上的Flash ExternalInterface存在问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几个小时里,我一直在为此苦苦挣扎,我真的不知道会出现什么错误。我只是试图让Javascript与Flash进行文本交流。我发现这个源码很好的例子

http://blog.circlecube.com/wp-content/uploads/2008/02/ActionscriptJavascriptCommunication.zip



我在本地运行html文件,它工作得很好发送和从闪存检索文本。然后我加载相同的确切示例到我的开发谷歌应用程序服务器,我不能从JavaScript文本发送到Flash。奇怪的是,虽然闪光灯能够发送JavaScript文本。任何人都可以看到他们是否可以通过GAE运行?非常感谢!

解决方案

我的代码中没有看到对allowDomain函数的调用。除非安全沙箱不允许您的Flash应用程序与服务器上的闪存进行通信,反之亦然。添加对Flash应用将执行的每个域的调用 System.security.allowDomain(mydomain.com,mySecondDomain.com,etc.com)上。此外,嵌入代码还需要通过包含参数< param name =allowScriptAccessvalue =always/> 。 b $ b

I've been struggling with this for the past couple hours now and I really don't know what could be wrong. I'm simply trying to get Javascript to communicate text with Flash. I found this great example with this source

http://blog.circlecube.com/wp-content/uploads/2008/02/ActionscriptJavascriptCommunication.zip

I ran the html file locally and it works just fine sending and retrieving text from flash. Then I load that same exact sample into my dev google app server and I can't send the text from javascript to flash. Oddly enough though flash is able to send Javascript text. Can anybody see if they can get this running with GAE? Thanks a million!

解决方案

I do not see a call to the allowDomain function in your code. With out that the security sandbox will not allow your flash application to communicate with flash and vice versa on the server. Add a call to System.security.allowDomain("mydomain.com", "mySecondDomain.com", "etc.com") for every domain the flash app will be executed on. Also the embed code also needs to specify access for JavaScript by including the parameter <param name="allowScriptAccess" value="always" />.

这篇关于Google App Engine上的Flash ExternalInterface存在问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆