devcajun
01-29-2009, 09:13 PM
Hi,
I found a couple of posts on this similar topic but can't seem to get it to work...
I am trying to setup a load swf ERROR checking script. This will be helpful in debugging while loading an external swf from a server other than that of my own control.
I have thus far but cannot get anything to output when i intentionally break the link to the swf file
Please help
function onLoadComplete(event:Event){
trace("Loaded successfully");
}
function onLoadError(event:IOErrorEvent){
trace("Error: " + event);
}
_SWFLoader_ld.contentLoaderInfo.addEventListener(E vent.COMPLETE, onLoadComplete);
_SWFLoader_ld.contentLoaderInfo.addEventListener(I OErrorEvent.IO_ERROR, onLoadError);
addChild(_SWFLoader_ld);
try {
_SWFLoader_ld.load(new URLRequest("http://www.web.com/swfname.swf"));
} catch (e:Error) {
trace("Error loading swf file");
}
thanks in advance
I found a couple of posts on this similar topic but can't seem to get it to work...
I am trying to setup a load swf ERROR checking script. This will be helpful in debugging while loading an external swf from a server other than that of my own control.
I have thus far but cannot get anything to output when i intentionally break the link to the swf file
Please help
function onLoadComplete(event:Event){
trace("Loaded successfully");
}
function onLoadError(event:IOErrorEvent){
trace("Error: " + event);
}
_SWFLoader_ld.contentLoaderInfo.addEventListener(E vent.COMPLETE, onLoadComplete);
_SWFLoader_ld.contentLoaderInfo.addEventListener(I OErrorEvent.IO_ERROR, onLoadError);
addChild(_SWFLoader_ld);
try {
_SWFLoader_ld.load(new URLRequest("http://www.web.com/swfname.swf"));
} catch (e:Error) {
trace("Error loading swf file");
}
thanks in advance