<! 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 = gb2312"/>
<Title> flash load progress </title>
<Script>
</Script>
</Head>
<Body>
<Div> <span class = "intro"> download progress: </span>
<Div class = "barborder">
<Div class = "bar" id = "loadpercent"> </div>
</Div>
</Div>
<Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width = "700px" height = "350" id = "ieGame">
<Param name = "movie" value = "http://360.kuaiwan.com/games/6/6C36DF75DE92FF1148592FF0F093E5C00DA17A91.swf">
<Param name = "quality" value = "high"> <param name = "wmode" value = "transparent">
<Embed
Wmode = "transparent"
Src = "http://360.kuaiwan.com/games/6/6C36DF75DE92FF1148592FF0F093E5C00DA17A91.swf"
Quality = "high"
Type = "application/x-shockwave-flash"
Pluginspage = "http://www.macromedia.com/go/getflashplayer"
Width = "700px" height = "350px" id = "fireFoxGame" name = "fireFoxGame">
</Embed>
</Object>
</Body>
</Html>
<Script>
If (window. navigator. userAgent. indexOf ("Firefox")> = 1 | window. navigator. userAgent. indexOf ("AppleWebKit")> = 1) {/* is fireFox */
Var progress = self. setInterval (function (){
Var progress = document. fireFoxGame;
Document. getElementById ("loadpercent"). innerHTML = "" + progress. PercentLoaded ();
}, 5 );
// Document. getElementById ("loadpercent"). innerHTML = "" + Math. abs (progress) + "% ";
} Else {/* is IE */
RefreshProgress ();
}
Function show () {// hide the AD layer and display the FLASH Layer
Document. getElementById ("showAD"). style. display = 'none ';
// Document. getElementById ("showSWF"). style. display = 'block ';
}
Function refreshProgress () {// refresh the progress bar function
Var bar = document. getElementById ("loadpercent ");
Var movie = document. getElementById ("ieGame ");
Var nPercentLoaded = Math. abs (movie. PercentLoaded ());
Bar. innerHTML = nPercentLoaded + "% ";
If (nPercentLoaded = 100 ){
Bar. innerHTML = "Game download is complete ";
} Else {
SetTimeout ('refreshprogress () ', 0 );
}
}
</Script>
Author: "brian. netmad's blog"