Sending variables from preloader

Hi,I’m using Flash MX.

I have a HTML frameset with preloader in the one of frames.
It shows loading progress of main.swf.
When preloader finishes main.swf opens in the same window.
What I want is to pass variable from preloader to main.swf as soon as main.swf is loaded.

something like this: in preloader code
if (percent == 100){
var z=1;
getURL(“main.html?z”,"_top",“GET”)// this is not working…

then in main.swf:first frame code
if (z==1){

}

regards,

Joakim