# Load multiple jpg's from xml doc

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