Help! loadMovie and onload

I have a URL Query String Generated Flash Site and I need this code so that when it can not find the swf typed it will return with an Error. Here’s my code that I thinks should work.

loader1.onLoad = function() {
if (success) {
pagetxt.text = (“page Found”)
} else {
pagetxt.text = (“File Not Found”);
}
};