Check if jpg is loaded from folder

Hi guys

I have a gallery where Im loading jpegs from a folder
I stop the timeline and load a jpg based on variabels from an xml file

How do you check if the image exists in the folder
I already check if the variabel is undefined but I also want to perform some action if the file is unavailable in the folder.

Say for example somebody enteres the image “firstImage.jpg” in the xml and then saves the image as “ffirstImage.jpg”
Flash wont find that image.