js引入flash文件,可自动播放
2012-07-30 16:03
357 查看
/
实现引入js调用flash文件的函数
file : 文件具体路径
w : 宽
h : 高
/
function getFlash(file, w, h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+file+'" />');
document.write('<param name="quality" value="high" />');
document.write('<embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>');
document.write('</object>');
}
/
eg:<script type="text/javascript" language="javascript">getFlash('hehe.swf','500','220');</script>
/
/
实现flash视频自动播放代码
file : 文件路径http://或file.swf
w : 宽
h : 高
/
function playVideo(file, w, h){
document.write('<object width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+file+'&hl=zh_TW&autoplay=1&fs=1&"></param>');
document.write('<param name="allowFullScreen" value="true"></param>');
document.write('<param name="allowscriptaccess" value="always"></param>');
document.write('<embed src="'+file+'&hl=zh_TW&autoplay=1&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+w+'" height="'+h+'"></embed>');
document.write('</object>');
}
/
eg:<script type="text/javascript" language="javascript">getFlash('hehe.swf','500','220');</script>
/
第二个方法当网页加载完成后,就可以播放有关的flash视频文件。
实现引入js调用flash文件的函数
file : 文件具体路径
w : 宽
h : 高
/
function getFlash(file, w, h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+file+'" />');
document.write('<param name="quality" value="high" />');
document.write('<embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>');
document.write('</object>');
}
/
eg:<script type="text/javascript" language="javascript">getFlash('hehe.swf','500','220');</script>
/
/
实现flash视频自动播放代码
file : 文件路径http://或file.swf
w : 宽
h : 高
/
function playVideo(file, w, h){
document.write('<object width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+file+'&hl=zh_TW&autoplay=1&fs=1&"></param>');
document.write('<param name="allowFullScreen" value="true"></param>');
document.write('<param name="allowscriptaccess" value="always"></param>');
document.write('<embed src="'+file+'&hl=zh_TW&autoplay=1&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+w+'" height="'+h+'"></embed>');
document.write('</object>');
}
/
eg:<script type="text/javascript" language="javascript">getFlash('hehe.swf','500','220');</script>
/
第二个方法当网页加载完成后,就可以播放有关的flash视频文件。
相关文章推荐
- 新手求助2---怎么在cnblogs里插入下载文件 的链接?如何 插入自动播放的 flash 或者 背景音乐?
- HTML中JS引入外部FLASH文件
- node.js开发中使用Node Supervisor实现监测文件修改并自动重启
- Android studio 引入 weex 中由.vue打包的.js文件,ReferenceError: Vue is not defined错误
- 引入外部JS或CSS文件的写法
- 引入外部css ,js文件
- Thinkphp5的css和js文件引入问题
- j2ee的web工程,jsp、html、js文件有叉号,怎么去掉自动验证,我不想看到叉号
- springmvc web-info目录下无法引入的js文件无效
- node.js使用Supervisor实现监测文件修改自动重启
- 傻瓜式学习webpack(五)——css的抽离和html的自动引入js/css
- 同一页面引入多个JS文件的编码问题
- jsp引入js,css文件的方法
- js引入多个js、css文件
- 为什么要在引入的css或者js文件后面加参数的详细讲解
- 动态引入js文件
- cmd和mxmlc命令行自动编译flash的as文件
- 同一页面引入多个JS文件的编码问题
- 关于springmvc无法引入js文件问题