First define the progress bar display layer: Copy the code The code is as follows: < ;span class="intro">Download progress: < /div> 🎜> The code is as follows: Define the FLASH display layer: < ;/object> js code: Copy code The code is as follows: <span>if(window.navigator.userAgent.indexOf("Firefox")>=1)//Determine whether it is FIREFOX Browser, FIREFOX does not support the PercentLoaded() function <a style="CURSOR: pointer" data="52621" class="copybut" id="copybut52621" onclick="doCopy('code52621')">{ <u>document.getElementById("loadpercent").innerHTML= "Firefox!No Attentions"; </u>document.getElementById("showSWF").style.display ='block'; </a>} </span>else </div>{ <div class="codebody" id="code52621">refreshProgress(); <br>} <br><br>function show()//Hide AD layer, show FLASH layer<br> { <br>document.getElementById("showAD").style.display='none'; <br>document.getElementById("showSWF").style.display='block'; <br>} <br><br>function refreshProgress()//Refresh progress bar function <br>{ <br>var downProgressWidth=502; <br>var bar = document.getElementById("loadpercent"); <br>var movie = document.getElementById("flashgame "); <br>var nPercentLoaded = Math.abs(movie.PercentLoaded()); <br>bar.style.width=Math.ceil(downProgressWidth*nPercentLoaded/100) "px"; <br>bar.innerHTML= nPercentLoaded "%"; <br><br>if(nPercentLoaded==100) <br>{ <br>bar.style.width=(downProgressWidth-2) "px"; bar.innerHTML= "Game download is complete" ; show(); <br>} <br>else <br>{ <br>setTimeout('refreshProgress()',0); <br>} <br>}<br><br> <br>In fact, the most Good code is to look at how some flash game websites are controlled. You can learn more knowledge and skills by looking at the source code.</div>