var start;
var intervalProcess;
window.onload = function () {
if(document.all) {
start = setInterval(‘checkOnLoad()’, 500);
} else {
intervalProcess = setInterval(“checkFlashLoaded()”, 500);
}
}
function checkOnLoad() {
if (document.readyState == “complete”) {
try{
intervalProcess = setInterval(“checkFlashLoaded()”, 500);
clearInterval(start);
}catch(err){return true;}
}
}
function checkFlashLoaded(){
if(document.getElementById(“flash”).PercentLoaded()==100){
你的方法
clearInterval(intervalProcess);
}
}