FLV player-querystring trouble

I currently have a swf that loads flv files into the media display via XML.

[SIZE=3]How would I go about changing this so that it loaded the flv into the Media Display via a query string?[/SIZE]

In my first Scene I have this action;

*[COLOR=Blue]var rtmpRoot, instance, file, type;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
if (!success) {
trace(“Cannot load XML”);
} else {
trace(“Loaded”);
//trace(this);

    file = this.childNodes[0].childNodes[0].childNodes[0].toString();
    trace(file.substr(file.length - 3, 3));
    type = file.toLowerCase().substr(file.length - 3, 3);
    trace (type);

}

};
x.load(“movie.xml”);[/COLOR]

And in my second Scene is the MediaDisplay = “flv_display” with this action*

[COLOR=Blue]trace ("FLV: type is " + type);
if (type == “flv”) {
trace (file);
flv_display.setMedia(file);
flv_display.visible = true;

flv_display.play();
stop();

}[/COLOR]*

Thank you