What’s the best way to check if loadMovie is successful? (ie. if the file exists). Any ideas? Thanks.
there isn’t a way to tell for sure if a movie exists, but you could assume it doesn’t after trying to load it for a few seconds with a timeout script like this:
Timeout = 4000;
loadMovieNum("test.swf", 1);
Start = getTimer();
this.onEnterFrame = function() {
if(_level1.getBytesTotal() < 5 && getTimer() >= Start + Timeout) {
// put file doesn't exist code here
}
}
should do the job, let me know if you have any problems
Where do you put this script? In the movie clip itself or in the frame? Thanks for the help.
Ok, I got it working somewhat but there is a problem. It works fine on my local hard drive but when I run it off my website, it doesnt work unless you let the movie load fully, then refresh.
Here is a link:
http://www.neptunecircle.com/photos/
When you first open the site, the ‘next’ button doesn’t work, but when you refresh it works, then when you hit the ‘next’ button on the second page, it doesnt work again untill you refresh.
any Ideas?