External Gallery Loading

I have a website created all in Flash AS3 and I have a XML Photo Gallery created in a separate file and I am trying to load the gallery into a specific frame on my site. I have tried a few things but I haven’t been able to figure it out so someone’s help would be much obliged. Thanks in advance!


Here is the code I am using:

var Xpos:Number = 152;
var Ypos:Number = 350;
var swf:MovieClip;
var loader:Loader = new Loader();

var gallerySWF:URLRequest = new URLRequest("GraphicsGallery/Ggallery.swf");


When I have the XML file in the same folder as the gallery (which it has to be) Flash gives me an error and the gallery doesn’t show up. When I move the XML file though the gallery itself loads into the correct spot but the pictures don’t because the XML file isnt there to call them.

This is the error it gives me when the XML is in the same file as the gallery:
“Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///ANTHONY/Portfolio/Ggallery.xml
at Ggallery_fla::MainTimeline/frame1()”