checkImageExist(“Images/test.jpg”);
function checkImageExist(imageURL) {
//--------------- image url from the attribute of the component -----------
//----------- loadvars are used to check the whether the image exists are not ----------
var imageURL = imageURL
var imgLoadVars = new LoadVars();
imgLoadVars.load(imageURL);
imgLoadVars.parent = this;
imgLoadVars.onLoad = function(success) {
if (success) {
trace("-------- Image exist ---------------"+imageURL);
mcImgHolder.loadMovie(imageURL);
startEnterFrame();
} else {
trace("-------- Image does not exist ---------------");
}
};
}