# Simple loadMovie with URL as variable

**URL:** <https://forum.kirupa.com/t/simple-loadmovie-with-url-as-variable/182747>\
**Category:** flash\
**Created:** [March 21, 2006, 4:57am UTC](https://forum.kirupa.com/t/simple-loadmovie-with-url-as-variable/182747 "2006-03-21T04:57:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tinuviel](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tinuviel/32/497_2.png) [@Tinuviel](https://forum.kirupa.com/u/Tinuviel)\
**Post date:** [March 21, 2006, 4:57am UTC](https://forum.kirupa.com/t/simple-loadmovie-with-url-as-variable/182747/1 "2006-03-21T04:57:25Z")

</div>

I’m having a handful of trouble with this.

a) thumbURL is a variable loaded from an XML file. The value is being passed correctly into Flash, as I have traced it and it outputs fine. thumbLoc is a number which increases through a for loop. So thumb0, thumb1, thumb2 etc. are the movie clips I want to load thumbURL into. The thumbURL I’m trying to load is in the format [http://www.tcreative.ca/images/stories/ylistenSmall.jpg](http://www.tcreative.ca/images/stories/ylistenSmall.jpg).

I have the following code:

```auto
thumb[thumbLoc].loadMovie(thumbURL);

```

Why isn’t this working?

b) When I test the movie, Flash should still load an external URL (such as [http://www.tcreative.ca/images/stories/ylistenSmall.jpg](http://www.tcreative.ca/images/stories/ylistenSmall.jpg)), right?

Any help is much appreciated. Dunno if I’m getting the syntax wrong or what. All my google searches are on not so relevant loadmovie topics. Thanks!

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [March 21, 2006, 5:17am UTC](https://forum.kirupa.com/t/simple-loadmovie-with-url-as-variable/182747/2 "2006-03-21T05:17:38Z")

</div>

target the movie clip like this

\_root[“thumb”+thumbLoc].loadMovie(thumbURL);

you need to start with the parent of the thumbN movie clips so if the thumb movie clips are inside a container moviclip and you were putting the code in a fram in the the container, then use

this[“thumb”+thumbLoc].loadMovie(thumbURL);
