# Trouble with the Photo Gallery using XML and Flash

**URL:** https://forum.kirupa.com/t/trouble-with-the-photo-gallery-using-xml-and-flash/169764
**Category:** flash
**Created:** [November 19, 2005, 3:13am UTC](https://forum.kirupa.com/t/trouble-with-the-photo-gallery-using-xml-and-flash/169764 "2005-11-19T03:13:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![paradrenaline](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@paradrenaline](https://forum.kirupa.com/u/paradrenaline)
#### Post date: [November 19, 2005, 3:13am UTC](https://forum.kirupa.com/t/trouble-with-the-photo-gallery-using-xml-and-flash/169764/1 "2005-11-19T03:13:19Z")

</div>

The tutorial was great, I renamed the mc to mygallery. When I test mygallery locally everything works fine. However, I am loading it externally into my main mc. When I do this I encounter the following problem.

the mc appears to load however the first image will no load, if I click next, the second will load and then I can click previous and the first will then load.

I have traced it to the firstImage() function and it won’t get past this line  
if (loaded == filesize)

loaded is TRUE  
filesize is UNDEFINED  
picture is UNDEFINED

I’ve tried my best to figure it out but I was hoping someone had the answer.

Cheers!  
Dan
