JavaScript通过代码调用Flash显示的方法
本文实例讲述了JavaScript通过代码调用Flash显示的方法。分享给大家供大家参考,具体如下:
<script type="text/javascript" language="javascript" src="Scripts/swfobject.js"></script> <script language="javascript"> function load(){ var swfVersionStr = "10.0.0"; var params = {}; params.quality = "high"; params.allowfullscreen = "false"; params.allowscriptaccess = "always"; //params.wmode = "transparent"; swfobject.embedSWF("flash/MainPage.swf", "FlashID", "597", "416", swfVersionStr,params); } //调用flash中的方法,"swfId"为html页中swf的id function setValue(o) { thisMovie("FlashID").getIds(o); } //搭建js与flash互通的环境 function thisMovie(movieName) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName]; } else { return document[movieName]; } } </script>
更多关于JavaScript相关内容感兴趣的读者可查看本站专题:《JavaScript动画特效与技巧汇总》、《javascript面向对象入门教程》及《JavaScript数据结构与算法技巧总结》
希望本文所述对大家JavaScript程序设计有所帮助。
相关推荐
lightindark 2020-07-04
maowenbei 2020-05-06
zebperfect 2013-03-30
87447100 2013-08-13
downtown 2010-01-30
pythonclass 2019-11-11
Jesus0 2011-01-14
whosemario 2015-04-08
clayluo 2017-06-05
二哈 2012-09-07
skyGAYD 2017-09-11
yidaizongshi 2016-07-30
yidaizongshi 2014-11-03
81226036 2016-07-18
83246835 2016-01-05
85206636 2015-12-02
一柯 2015-10-21
87216237 2015-09-22
88971730 2011-08-18