Ive created a swf file with Xcelsius. How can I check when it s is fully loaded?
I tried jquery
$(document).ready(function() {
alert("document ready occurred!");
});
$(window).load(function() {
alert("window load occurred!");
});
but i get the alert before the swf is ready
Any javascript alternative?
Thanks for your help!
Its seems you can´t actually check when its fully loaded. But if you want to do something after it´s loaded you can use a function in javascript with setInternval and just pass the attribute until the movie gets it
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
}