用js控制多个Flash的连续播放

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title> new document </title>
  <meta name="generator" content="editplus" />
  <meta name="author" content="" />
  <meta name="keywords" content="" />
  <meta name="description" content="" />
</head>
<body>
   <object id="swf" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
        <param name=movie value="http://www.soojs.com/folder/flash/用js控制多个Flash的连续播放/1.swf">
    </object>
    <br />
    <script type="text/javascript">
    <!--
        var flashs=new Array("http://www.soojs.com/folder/flash/用js控制多个Flash的连续播放/1.swf","http://www.soojs.com/folder/flash/用js控制多个Flash的连续播放/2.swf","http://www.soojs.com/folder/flash/用js控制多个Flash的连续播放/3.swf");
        var curFlash=0;
        var lastTimeFrame;
        var flashLen=flashs.length;
        function updateMovie(){
            var au_sound=document.getElementById("swf");
            if(au_sound.PercentLoaded()==100){
                var totalFrames=au_sound.TotalFrames;
                var curFrame=au_sound.CurrentFrame()+1;
            
                var isPlay=au_sound.IsPlaying();
                if(totalFrames==curFrame){
                    au_sound.movie=flashs[++curFlash%flashLen];
                }
                document.getElementById("debug").innerHTML="<strong>--播放信息--</strong><br />当前Flash:<input size=14 readonly value="+flashs[curFlash%flashLen]+"><br />  总帧数:<input size=14 value="+totalFrames+" readonly><br />  当前帧:<input size=14 readonly value="+curFrame+"><br />播放状态:<input size=14 readonly value="+(isPlay?"播放":"停止")+"><br />";
            }else{
                document.getElementById("debug").innerHTML="<strong>--播放信息--</strong><br />当前Flash:<input size=14 readonly value="+flashs[curFlash%flashLen]+"><br />  总帧数:<input size=14 value='Loading Flash' readonly><br />  当前帧:<input size=14 readonly value='Loading Flash'><br />播放状态:<input size=14 readonly value='Loading Flash'><br />";
            }
            setTimeout("updateMovie()",100);
        }
        
        window.onload=function(){
            setTimeout("updateMovie()",100);
        }
    //-->
    </script>
    <br /> <br />
    <div id="debug"></div>
</body>
</html>


'引用自http://www.52515.net:8088/file.asp?fileid=313735392672713D323030372D362D323626626F61726469643D3130


文章来自: 本站原创
引用通告地址: http://www.is21.cn/trackback.asp?tbID=458
Tags:
评论: 0 | 引用: 0 | 查看次数: 2621
发表评论
你没有权限发表留言!