# Pass URL string from external file to AS variable (dynamic file names)

**URL:** <https://forum.kirupa.com/t/pass-url-string-from-external-file-to-as-variable-dynamic-file-names/128877>\
**Category:** Uncategorized\
**Created:** [November 17, 2004, 7:24am UTC](https://forum.kirupa.com/t/pass-url-string-from-external-file-to-as-variable-dynamic-file-names/128877 "2004-11-17T07:24:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![polishbroadcast](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@polishbroadcast](https://forum.kirupa.com/u/polishbroadcast)\
**Post date:** [November 17, 2004, 7:24am UTC](https://forum.kirupa.com/t/pass-url-string-from-external-file-to-as-variable-dynamic-file-names/128877/1 "2004-11-17T07:24:04Z")

</div>

I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn’t load. I suspect that there is something i’m doing wrong with the quotes. What am i doing wrong?

```auto
var vfile:String = string("path");

supervideo = function () {
	var netConn:NetConnection = new NetConnection();
	netConn.connect(null);
	var netStream:NetStream = new NetStream (netConn);
	video.attachVideo(netStream);
	netStream.setBufferTime(10);
	netStream.play(vfile);
	
};

loadText.load(_global.text_url1);
loadText.onLoad = function(success) {
    if(success){	
		showtitle.text = this.title1;
		vfile = this.flv_name;
		supervideo();
		}
	}

```

The value in the php file looks like this:

```php
&flv_name="elements/flv/superape.flv"&

```

So ultimately i want to end up with

```auto
netStream.play("elements/flv/superape.flv");

```

. I know the value of

```auto
vfile

```

is being passed from the php file and getting into the

```auto
supervideo();

```

function because i have a textbox echoing

```auto
vfile

```

. I have tried defining the variable with and without the “:String”. Please let me know if you can see any errors. Thanks!
