Posted in Javascript onFebruary 02, 2016
本文实例讲述了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通过代码调用Flash显示的方法
- Author -
皮蛋声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@