Trouble with the Photo Gallery using XML and Flash

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