微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Actionscript与javascript交互实例程序(修改)

mxml页面

rush:js;"> dobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" xmlns:code="http://code.google.com/p/flex-iframe/" creationComplete="initApp()">

html页面

rush:js;"> MyHtml.html <Meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <Meta http-equiv="description" content="this is my page"> <Meta http-equiv="content-type" content="text/html; charset=UTF-8"> bed src="test.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="300"> 效果" onclick="callAs()"/>

如果试过以上的方法,会发现在被嵌入的Html见面中又嵌入了一个父级的swf文件,如下

这种情况显然不是我想要的结果。于是修改代码,如下:

mxml页面

rush:js;"> dobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" xmlns:code="http://code.google.com/p/flex-iframe/" creationComplete="initApp()"> 调用js" click="button1_clickHandler(event)"/>

html页面

rush:js;"> MyHtml.html <Meta http-equiv="keywords" content="keyword1,keyword3"> <Meta http-equiv="description" content="this is my page"> <Meta http-equiv="content-type" content="text/html; charset=UTF-8"> 效果" onclick="callA()"/>

这样,html的js脚本就可以直接调用as脚本,而不需要再次嵌入swf文件

以上所述是小编给大家介绍的Actionscript与javascript交互实例程序(修改)。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持

原文地址:https://www.jb51.cc/js/45651.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐