Passing variables between swf files

In file1 I have a variable called myvar; I load file2 using the Loader class using code below.
What do I need to do to get the value of myvar from file2???

Just a plain old trace(myvar) in file2 doesnt work.

 
var myvar:String="hello";
var myloader:Loader= new Loader();
addChild (myloader);
var request:URLRequest = new URLRequest("file2.swf");

myButton.addEventListener(MouseEvent.CLICK, loadIt);

function loadIt(event:MouseEvent):void {
 myloader.load(request);
}