The context for loadMovie(); is one of the easiest to use, but as such it is also one of the easiest to mess up.
You are using loadMovie(); to load gallery.swf into main.swf on a button click.
gallery.swf is loading an XML, some images and thumbnails.
the XML, the thumbnails, the images, gallery.swf and main.swf all need to be in the exact same directory.
Once in there everything should work out fine as long as loadMovie is set up correctly.
First you should have a spot inside main.swf for gallery.swf to load. An empty movieclip is perfect. To make an empty movieClip >> Make sure NOTHING on your stage is selected. choose "Insert" then choose "New Symbol" give the new symbol a name of "empty", then check the "Advanced" button. Then check the box next to "Linkage: [] Export For ActionScript"
Click "Okay" now you are in edit mode of the new movie clip. Click back to your main scene without doing ANYTHING to the new movie clip.
From your library drag the emptyMC to the stage where ever you want gallery.swf to load. Then give it an instance name of "empty"
Once all that is done, click on your button you are using to load gallery.swf and in the actions panel put this:
Code:
on(release){
_root.empty.loadMovie("gallery.swf");
}
That's it. Upload everything and test it out

Bookmarks