Load different XML in one SWF with container


I’m working on a site with a portfolio. The menuitems are triggering from a menu than loaded into a new SWF. All images are loaded from a XML-file into a container. Each menu-item is triggered from a flash timeline like this:


cont.ontwerpen.ontwrp1.onRelease = function() {
        loadMovie("portfolio.swf", "_root.route");      

I don’t know if or how it’s possible to create 1 SWF file with one container in which each time a different XML-triggered portfolio is loaded. My portfolio.swf looks like this:


myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
        //portfolioTag = this.firstChild;
        numimages = this.firstChild.childNodes.length;
        spacing = 60;
        for (i=0; i<numimages; i++) {
                this.picHolder = this.firstChild.childNodes*;
                this.thumbHolder = frame.thumbnails.createEmptyMovieClip("thumbnail"+i, i);
                this.thumbHolder._x = i*spacing;
                this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
                this.thumbHolder.title = this.picHolder.attributes.title;
                this.thumbHolder.main = this.picHolder.attributes.main;
                this.thumbHolder.onRelease = function() {
                        frame.title_txt.text = this.title;

Since I don’t want to create a new SWF for every portfolio item I’d like to know if it’s possible to place all XML links in one portfolio SWF and make some sort of listener that ‘sees’ which XML file needs to be loaded in the container? Select portfolio1 from the timeline loads xmlphoto1.xml, portfolio2 from the timeline loads xmlphoto2.xml
Something like this (This code doesn’t work but it has to give you an idea what I mean):

if menuItem1 then load myPhoto.load("xml/xmlphoto1.xml");
if menuItem2 then load myPhoto.load("xml/xmlphoto2.xml");
if menuItem3 then load myPhoto.load("xml/xmlphoto3.xml");

Can somebody help me with this one? I:-)