Ok, correct me if this is the wrong way of doing things. I solved the problem and heres what I did.
I changed the function that's in the main timeline (_root) to this:
Code:
//Set button actions
function loadGallerys(){
//myRootXMLGalleryPath is defined in the buttonClick event
loadGallery(myRootXMLGalleryPath);
}
Then in my mc where the button click occurs, I put this in the onRelease function of the button:
Code:
//used in the _root timeline.
var mygallery:String = "Flash/gallery1.xml";
_root.myRootXMLGalleryPath = mygallery
_root.play();
}
}
This seems to work for all my buttons now, I just have to define the strings within those button events. Is that the proper way of doing things?
thanks