天天看點

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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>美女小遊戲_成人小遊戲_h小遊戲_mm小遊戲</title>
<meta name="keywords" content="美女小遊戲,成人小遊戲,h小遊戲,mm小遊戲"/>
<meta name="description" content="topzj小遊戲提供動漫美女小遊戲,成人小遊戲,h小遊戲,mm小遊戲,最新好玩的小遊戲盡在topzj小遊戲。"/>
<style type="text/css">
#playflash{ border:1px solid red; position:relative;}
.ProgressBar{ position:absolute; top:0px; left:0px; width:100%; text-align:right;}	
#swfloading{position:absolute; z-index:10000; left:0px; top:20px;}
#divBoolar{ background:#76b3eb;}
</style>
</head>
<body>
 
<div id="playflash"> 
    <div class="ProgressBar">
        <div id="divBoolar"><span>0%</span></div>
    </div>
    <div id="divGameBox">
        <embed quality="high" id="swfloading" pluginspage="http://www.adobe.com/sho
    ckwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" src="http://images.7794.com/a/sucai/dj/bigcg/new/15sjlc2.swf" width="270" height="200" align="middle" id="QY_rm_flash" wmode="Opaque"></embed>
    </div>
</div>
<div class="divBotton">
<script type="text/javascript" >
var ubType = (navigator.userAgent.indexOf("MSIE") > 0);
var Firefox = (navigator.userAgent.indexOf("Firefox") > 0);
var timer;

function load(swfUrl) {
    var str = "";
    str += "<OBJECT id=\"objrUrl\" codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"660\" height=\"400\">";
    str += "<PARAM name=\"movie\" value=\"" + swfUrl + "\">";
    str += "<PARAM name=\"quality\" value=\"high\"><EMBED id=\"emSrc\" height=\"400\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" width=\"660\" src=\"" + swfUrl + "\" wmode=\"transparent\" quality=\"high\">";
    str += "</OBJECT>";
    $("divGameBox").innerHTML += str;
    timer = setInterval("loading()", 1000);
}
function loading() {
    var divIng = $("divBoolar");
    var objrUrl = $("objrUrl");
    var tmeValue = 0;
    if (ubType) {//判斷是否IE浏覽器
        tempValue = objrUrl.PercentLoaded();
    }else {
        tempValue = document.embeds["emSrc"].PercentLoaded();
    }
    divIng.style.width = tempValue + "%";
    divIng.innerHTML = tempValue + "%";
    if (tempValue == 100) {
        $("swfloading").style.display = "none";
		divIng.style.display="none";
        clearInterval(timer);
    }
}

function $(idValue){
    return document.getElementById(idValue);
}
</script>
<script type="text/javascript">load('http://flash.topzj.com/a/5908.swf');</script> 
</div>
 
 
</body>
</html>
           
web