When Loading an swf, and invoking the onLoad handler, it wouldn’t work. However, when using Bokel’s fix, it’d work-out that issue.
Another clever solution made by FlashGuru which involves loading an swf directly from an instance of the LoadVars Class. However, there are cases, though, for which it returns a 404 error.
fileExists = new LoadVars();
fileExists._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
} else {
trace("error");
}
};
fileExists.load("myfile.swf");
//initiate the test
For more information, see FlashGuru’s article:
:stunned: :stunned: :stunned: