加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何从Flash触发JavaScript函数?

发布时间:2020-12-15 07:30:35 所属栏目:百科 来源:网络整理
导读:如何在Flash中使用actionscript触发 JavaScript函数? 目标是从Flash影片中触发jQuery功能 解决方法 看看 ExternalInterface级. 从AS3语言参考: The ExternalInterface class is the External API,an application programming interface that enables strai
如何在Flash中使用actionscript触发 JavaScript函数?

目标是从Flash影片中触发jQuery功能

解决方法

看看 ExternalInterface级.
从AS3语言参考:

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);

你可以提交参数并接收回调…很酷,对吧?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读