向Flash传值的两种方式
1、flashname.swf?p1=1&p2=11
2、FlashVars 两者也可以混合使用<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="" width="300" height="30">
<param name="movie" value="gp4.swf?p1=1&p2=2" /> <param name="quality" value="high" /> <param name="FlashVars" value="p3=3&p4=4" /> <embed src="gp4.swf?p1=1&p2=2" quality="high" pluginspage="" type="application/x-shockwave-flash" width="300" height="30" FlashVars="p3=3&p4=4"></embed> </object> 采用swfobject.js的方式加载swf,swfobject.js是Adobe提供的网页嵌入Flash的标准JS文件,可以兼容各种浏览器。 <div id="my_chart"></div> <script type="text/javascript"> swfobject.embedSWF("gp4.swf?p3=3&p4=4", "my_chart", "300", "30", "9.0.0", "expressInstall.swf", {"p1":"1","p2":"2"} ); </script>注:{"p1":"1","p2":"2"}中p1、p2的引号可以省略
参考: