Trying to pass a string var from html url

So, I want to pass a string variable to a SWF so that I can specify a XML file to load without republishing the SWF. When I assign the string variable to a textfield it is correct. But when I use that variable in the loader it does not display the XML from that file. You can see below that I commented out the string “lesson_11/images/0301_objectives.xml”. If I put this string in the loader it works, if I use the string variable in its place it does not work. Can anyone see what I am doing wrong? Thanks in advance.


var xmlFileToLoad:String;
var myQueryString:Object;
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
function loaderComplete(myEvent:Event)
{
 var myQueryString = stage.loaderInfo.parameters.xml_file;
 
 xmlFileToLoad = "lesson_11/images/0301_objectives.xml";
 txtTryPassVar.text =xmlFileToLoad;
}
 
loader.load(new URLRequest(xmlFileToLoad));//"lesson_11/images/0301_objectives.xml"