# Load multiple jpg's from xml doc

**URL:** <https://forum.kirupa.com/t/load-multiple-jpgs-from-xml-doc/57498>\
**Category:** Uncategorized\
**Created:** [July 13, 2004, 7:29pm UTC](https://forum.kirupa.com/t/load-multiple-jpgs-from-xml-doc/57498 "2004-07-13T19:29:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fostom](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@fostom](https://forum.kirupa.com/u/fostom)\
**Post date:** [July 13, 2004, 7:29pm UTC](https://forum.kirupa.com/t/load-multiple-jpgs-from-xml-doc/57498/1 "2004-07-13T19:29:28Z")

</div>

Hi! Can anyone tell me how I can load multiple jpgs into a flash movie from a xml document? I need to create a movie clip on the fly… well, this I have managed, but lets say I have 5 images I want to display from a xml doc at different positions in the movie at the same time. To create this I do a for-loop on all the images in the xml file and get the image file paths, then I create an unique filename (ex. var movieClipName:String = “newFileName” + j;) (j is the iterator in the for-loop), then I create a new movieclip (ex. \_root.createEmptyMovieClip(movieClipName, j);

…here the problem starts… you see, now I want to position the new movieClip. Ideally I would see this work: \_root.movieClipName.\_x = 40 \* j;  
\_root.movieClipName.\_y = 40 \* j;  
loadMovie(path, movieClipName);  
…but this doesnt work. I cant find ANY way to position the new movie clip.

Does this make any sense? ANY IDEAS?

Regards, Tommy

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 14, 2004, 6:46pm UTC](https://forum.kirupa.com/t/load-multiple-jpgs-from-xml-doc/57498/2 "2004-07-14T18:46:16Z")

</div>

Instead of \_root.movieClipName.\_y = 40 \* j; you should try with:  
**\_root[movieClipName].\_x =40\*j;**  
**\_root[movieClipName].\_y =40\*j;**
