# loadMovie and passing URL value from a variable

**URL:** https://forum.kirupa.com/t/loadmovie-and-passing-url-value-from-a-variable/204058
**Category:** flash
**Created:** [October 16, 2006, 8:11pm UTC](https://forum.kirupa.com/t/loadmovie-and-passing-url-value-from-a-variable/204058 "2006-10-16T20:11:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tom\_jones](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tom\_jones](https://forum.kirupa.com/u/tom_jones)
#### Post date: [October 16, 2006, 8:11pm UTC](https://forum.kirupa.com/t/loadmovie-and-passing-url-value-from-a-variable/204058/1 "2006-10-16T20:11:41Z")

</div>

Hi.

I would like to use a variable for the url portion of the loadMovie function…

an example would be as follows:

instead of:

```auto
loadMovie("file.swf",_level0.foo);

```

i would like to do:

```auto
theURL = "file.swf";
loadMovie(theURL,_level0.foo);

```

or

```auto

theURL.text = "file.swf";
loadMovie(theURL,_level0.foo);

```

but these do not seem to work. Can anyone explain how to pass the variable to loadMovie properly, or let me know what i’m missing? I am using flash mx2004 and targeting flash 7 player.

Thanks,
