XML loader and AS3 class

I have got a problem with this little piece of code in my FLA timeline

source="myData.xml" 

which I want to add to an AS class which has the following:

private var mysource:String

and then this:

public function set source(s:String):void
  {
      mysource = s;
      var loader:URLLoader = new URLLoader(new URLRequest(mysource));
      loader.addEventListener(Event.COMPLETE, sourceLoaded);
  }


Could anyone help me how to put somewhere in the class to load properly?