Javascript 与 ActionScripts 3.0 的交互 - 草山狐随笔 - PHP,J2EE,Flex,JavaScript,SEO研究--成功就躲在恐惧背后
广告位招租
| |
ActionjScript3.0和JavaScript同为客户端开发技术,最大的不同在于,ActionScript3.0语言运行于flash player中,Javascript语言运行于浏览器中。
ActionScript3.0调用Javascript使用ExternalInterface类中的call方法。ExternalInterface类在"flash.external.*"包中。调用语法如下所示:
ExternalInterface.call(JavaScript函数名, 参数1,参数2,....);

在JavaScript调用ActionScript3.0函数之前,要声明ActionScript3.0函数可调用。方法是使用 ExternalInterface类的 addCallback方法,如下所示:
ExternalInterface.addCallback(别名,ActionScript3.0中的函数名);
Flex相关 | 评论(0) | 引用(0) | 阅读(511)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]