如何公开嵌入式 Flash 对象的 JavaScript 接口?
JavaScript 和Flash Player 可以通过Flash 的ExternalInterface 机制交换数据:您注册希望能够从JavaScript 调用的ActionScript 函数。
我的问题:如何找出 Flash 对象的哪些 ActionScript 函数可供我从 JavaScript 调用(假设它们没有记录)?
有没有一种编程方法可以在 JavaScript 中做到这一点?
谢谢!
JavaScript and the Flash Player can exchange data via Flash's ExternalInterface mechanism: you register ActionScript functions that you would like to be able to be called from JavaScript.
My question: How can I figure out what ActionScript functions of a Flash object are available for me to call from JavaScript (assuming they are not documented)?
Is there a programatic way to do this in JavaScript?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能直接枚举它们(它们不会在 for..in 循环中列出),但你可以显式地测试每一个......
如果在 $(document).ready 或 window.onload 期间调用,这可能会失败- swiff 必须“初始化”(加载和注册)才能使公开的方法可用。
you can't enumerate them directly (they won't be listed in a for..in loop), but you can test for each one explicitly...
this might fail if called during $(document).ready or window.onload - the swiff must be 'initialized' (loaded and registered) for the exposed methods to be available at all.