(1)为了方便编写个链接页面(以一个编的课件为例)
第一个文件(read.html)
1 <html> 2 <title>Flash content by PowerCam</title> 3 <body> 4 5 <script> 6 window.setTimeout("open_flash()", 100); 7 function open_flash() 8 { 9 window.open("index.html", null, "width=1014, height=675, left=0, top=0, menubar=no, resizable=no, status=yes, titlebar=no, toolbar=no"); 10 } 11 </script> 12 13 <div align=center> 14 Created with PowerCam, FormosaSoft <br> 15 <a href='http://www.powercam.com.tw'>http://www.powercam.com.tw</a> <p> 16 <input type=button value='read' onclick='open_flash()'> 17 </div> 18 19 </body> 20 </html>
第二个文件(index.html)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-TW" lang="zh-TW"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=big5" /> 5 <title>PowerCam Player</title> 6 </head> 7 <body bgcolor="#ffffff" topmargin="0" leftmargin="0" scroll=no> 8 <script src='flash.js'></script> 9 </body> 10 </html>
第三个文件(flash.js)
1 document.write(" 2 <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='1014' height='675' id='powercam' align='middle'> 3 <param name='allowScriptAccess' value='sameDomain' /> 4 <param name='movie' value='powercam.swf' /> 5 <param name='quality' value='high' /> 6 <param name='bgcolor' value='#ffffff' /> 7 <PARAM NAME=FlashVars VALUE='playSlide=1'> 8 <embed src='powercam.swf' FlashVars='playSlide=1' quality='high' bgcolor='#ffffff' width='1014' height='675' name='powercam' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> 9 </object>");
第四个文件(outline.txt)(按自己的思路进行排版)
1 pic=photo.jpg&subject=张孝祥Java课程系列:HTTP协议详解&author=张孝祥&slide1=1. 张孝祥IT课堂&target1=media1.swf&len1=0:00:26&slide2=2. HTTP协议详解&target2=media2.swf&len2=0:00:30&slide3=3. 第二讲 请求行与命令行&target3=media3.swf&len3=0:11:38&slide4= 3.1 使用GET和POST方式传递参数&target4=media4.swf&len4=0:28:17&slide5= 3.2 响应状态码&target5=media5.swf&len5=0:01:52&slide6= 3.3 响应状态码-典型情况&target6=media6.swf&len6=0:04:06&slide7=4. 特别推荐&target7=media7.swf&len7=0:00:44
其中的flash.js中的
1 <embed src='powercam.swf' FlashVars='playSlide=1' quality='high' bgcolor='#ffffff' width='1014' height='675' name='powercam' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />
决定了先播放谁,txt文件决定了播放的顺序
剩下的是视频和picture文件,这些文件放在一个文件中就可以运行了(点击read.html-->调用index.html-->调用flash.html-->调用outline.txt)
好了这只是冰山一角