Hello everyone,
I am trying to trap a Loader error and handle with a default image.
There are multiple loaders so I need to catch and fill the one that errors.
Any suggestions on this will be greatly helpful.Code:var gell:Loader = new Loader(); addChild(gell); gell.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorCatcher); function errorCatcher(e:IOErrorEvent):void{ // This is not working. Have tried both lines. //gell = Loader(e.target.loader); var gell:Loader = LoaderInfo(e.target).loader; gell.load(new URLRequest('blank.jpg')); } gell.load(new URLRequest('cat.jpg'));




Reply With Quote