簡體   English   中英

如何檢查嵌入在html上的Xcelsius的swf是否已完全加載?

[英]How to check if the swf of Xcelsius embeded on html is fully loaded?

我已經用Xcelsius創建了一個swf文件。 如何檢查何時完全加載?

我嘗試了jQuery

$(document).ready(function() {
      alert("document ready occurred!");
});

$(window).load(function() {
      alert("window load occurred!");
});

但是在瑞士法郎准備好之前我得到了警報

任何JavaScript替代品?

謝謝你的幫助!

看來您實際上無法檢查何時完全加載。 但是,如果要在加載后做一些事情,可以在javascript中使用帶有setInternval的函數,然后傳遞屬性,直到電影得到它為止

function setAttribute(){
      var attributes = {
       id: "movie",
        name: "movie"
      };
      swfobject.embedSWF("movie.swf", "movie", "1025", "678", "9.0.0", attributes);
       var i = 1;
          var sInt = setInterval(function() { 
            if(i >= 10) {
              clearInterval(sInt);
            }else{
              i++;
           }
            //here goes the parameter you want to pass to the movie
       }, 500);  //increase the interval if you need it
    }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM