I would like like to replace a spirte’s image.
But before that, i want to check if the image exist in the directory or not. Is there a way to do it?
newImage = new ImageLoader(dir + temChild.category + '/' + temChild.productUrl + '.png', {
container : temChild,
height : 80,
width : 80,
scaleMode : 'proportionalInside',
onComplete : onColorImageLoad,
centerRegistration : true,
noCache: true,
autoDispose : true
});
If you load one image with ImageLoader you can use callbacks (events).
I use ImageLoaderVars class because of aoutocomplete
If you have many ImageLoders in one LoaderMax decide what you want from failed loaders, by default in LoaderMax skipFailed=true;. Also there are LoaderMax events: childFail, ioError, securityError.