loadMovie and passing URL value from a variable

Hi.

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

an example would be as follows:

instead of:

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

i would like to do:

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

or


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,