Accessing an Event.COMPLETE listener

I’m having problems accessing a Event.COMPLETE listener for loading a php file:

function prepareD(){
           //more code before
          var hsloader:URLLoader = new URLLoader();
          hsloader.dataFormat = URLLoaderDataFormat.VARIABLES;
          hsloader.addEventListener(Event.COMPLETE, highSdata);
          hsloader.load(myData);
           //more code after
            
}
function highSdata(evt:Event){
            if(evt.target.data.highS<(Math.round(musicC/musicL*100))) {
              //code
           } 
}

What is happening is I’m creating a new URLloader, then loading the php, and I create a Event.COMPLETE listener, but when the load completes (I’ve tested with navigateToURL), the listener doesn’t trigger. I’ve also tried putting the var before functions, but it doesn’t work either… Any ideas?

Thanks!