你如何触发闪光的JavaScript函数? [英] How do you trigger javascript functions from flash?
问题描述
你如何触发闪光灯使用ActionScript的JavaScript函数?
How do you trigger a javascript function using actionscript in flash?
我们的目标是触发从flash动画jQuery的功能
The goal is to trigger jQuery functionality from a flash movie
推荐答案
看看的<一个href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html">ExternalInterface-Class.
从AS3语言参考:
Take a look at the ExternalInterface-Class.
From the AS3-Language Reference:
ExternalInterface类是 外部API,应用程序 编程接口,使 之间实现直接通信 ActionScript和Flash播放器 盛载例如,HTML页 使用JavaScript。 Adobe建议 使用ExternalInterface的所有 JavaScript的动作通讯。
The ExternalInterface class is the External API, an application programming interface that enables straightforward communication between ActionScript and the Flash Player container– for example, an HTML page with JavaScript. Adobe recommends using ExternalInterface for all JavaScript-ActionScript communication.
和它的工作是这样的:
ExternalInterface.addCallback("sendToActionScript", receivedFromJavaScript);
ExternalInterface.call("sendToJavaScript", input.text);
您可以提交参数及免费获赠回调... pretty的酷,不是吗? ;)
You can submit parameters and recieve callbacks...pretty cool, right? ;)
据我所知这也将在AS2 ...
As I know it will also work on AS2...
这篇关于你如何触发闪光的JavaScript函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!