# Loading Movie using URL in param variable

**URL:** <https://forum.kirupa.com/t/loading-movie-using-url-in-param-variable/231131>\
**Category:** flash\
**Created:** [July 2, 2007, 1:05pm UTC](https://forum.kirupa.com/t/loading-movie-using-url-in-param-variable/231131 "2007-07-02T13:05:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yamthief](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yamthief/32/3470_2.png) [@Yamthief](https://forum.kirupa.com/u/Yamthief)\
**Post date:** [July 2, 2007, 1:05pm UTC](https://forum.kirupa.com/t/loading-movie-using-url-in-param-variable/231131/1 "2007-07-02T13:05:56Z")

</div>

I’ve made an FLV player and it works like a charm when the location of the FLV is hardcoded into the actionscript inside the player, but i’m having trouble making it load a video dynamically depending on variables passed to the flash within the param tag, can someone please tell me where i’m going wrong?

first frame actions:

```auto
loadvid = new LoadVars();
loadvid.load($video);

```

MovieClip Actions:

```auto
onClipEvent (construct)
{
     contentPath = $video;
}

```

When i publish this movie the output debugger says:  
Error opening URL “file:///C|/Documents%20and…/Desktop/undefined” obviously because i haven’t defined $video for the movie, but when i define it in the html it doesn’t work.

When i have the following setting hard coded in the movieclip, it works:

```auto
onClipEvent (construct)
{
     contentPath = "http://www.domain.com/video.flv";
}

```

any help would be greatly appreciated,  
if you would like to look at more of the source, gimme a shout.  
Thanks.
