How to check if file exsists

Is the onLoad function the only way to find out if a file exist or not. As for now. I’m looping through a xml file. if image exist i add the filepath to an array if not, i ignore it. But if i check the filepath with onLoad. All the images in the xml file are loaded. I dont want to load the files yet.

var fileFound:Boolean = new Boolean();
var fileExists = new LoadVars();
fileExists.onLoad = function (success)
{
if (success)
{
fileFound = true;
}
else
{
fileFound = false;
}
};

fileExists.load(“file.jpg”);