我有一个教育应用程序,其中包含三个组件,即; android 通信引擎、flex 内容桥和 flash 内容。现在我的任务是用 HTML 内容替换 Flash 内容,HTML 内容将通过 JavaScript 与 flex bridge 进行通信。我已经尝试这个东西一个多星期了,但没有成功。
是否有可能在空中移动项目(为 android 编译)中实现这一目标而无需任何黑客攻击?
最佳答案
正如 Pieter 所建议的,this对于那些希望通过 Flex 使用 Javascript 进行通信的人来说,这是一个很好的享受。但由于链接可能会中断,让我在这里稍微解释一下:
在 JavaScript 中
document.location = '$' + 'Data#As#String';
在 Flex 中
webview.addEventListener( LocationChangeEvent.LOCATION_CHANGING,
handleLocationChanging );
function handleLocationChanging( event:LocationChangeEvent ):void
{
event.preventDefault();
//location parameter will have a absolute path of the .html file as a prefix
var strParameters:Array = (e.location as String).split("$");
trace(strParameters[1] + "Is the string received from Javascript");
}
关于javascript - flex air 移动通信与 javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14722387/