I've googled around for a while tonight for things like "actionscript 1 check file exists" and so on, and the best I find is people saying to check if a file exists, do this
The problem is while that may itself work, I can't put all that in for every image load, and I can't make it into any kind of function because the function will always return false when called because the image doesn't load until later. And I can't pass the function what to do when it loads etc. So yeah I've tried all sorts. The code I'm really trying to come up with would make this possible
or maybe
That way I can simply load images if they're there and if now I can load a library item that is a 'image not found' symbol. But frankly I can't for the life of me do it -_-
_________________________________
Leozack
Code:
fileExists=new LoadVars();
fileExits._parent=this;
fileExists.onLoad=function(success)
{
//success is true if the file exists, false if it doesnt
if(success)
{
//the file exists
var nm=this._parent.createEmptyMovieClip("swfHolder",1); //so create a movieclip
nm.loadMovie("myfile.swf"); //and load our .swf file into it
}
}
fileExists.load("myfile.swf") //initiate the test
Code:
If (DoesFileExist(filename)) { ShowImage(clip,filename); }
Else { clip.attachMovieClip("libitem","libitem",1); }
Code:
var didItWork = ShowImage(clip,filename);
if (!didItWork) { clip.attachMovieClip("libitem","libitem",1); }
_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);