# FLV player-querystring trouble

**URL:** <https://forum.kirupa.com/t/flv-player-querystring-trouble/213846>\
**Category:** flash\
**Created:** [January 23, 2007, 6:54pm UTC](https://forum.kirupa.com/t/flv-player-querystring-trouble/213846 "2007-01-23T18:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericb2007](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@ericb2007](https://forum.kirupa.com/u/ericb2007)\
**Post date:** [January 23, 2007, 6:54pm UTC](https://forum.kirupa.com/t/flv-player-querystring-trouble/213846/1 "2007-01-23T18:54:38Z")

</div>

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
