AS3.0 help please

Thanks for reading this…

I’m trying to simplify a flash web site that shows multiple photo galleries which are selected by an accordion menu. Effectively whichever menu item you select it calls up the same SWF movie file but with a different XML file which details the photos, captions etc. etc.

Just to confuse things my accordion menu is also controlled by it’s own XML file and, for each menu item I can call a function when it has been clicked.

At present the way my script works is by defining a function to jump to a particular frame when a menu button is clicked and within that frame I specify the XML file I want the SWF to load.

As I have approx. 40 different galleries this has led to lots of code duplication along the various frames in the Flash file. I was wondering if anyone had a more elegant solution than mine.

FYI - I’m fairly new to AS3.0, not a complete beginner but only scoring fairly low in the scale so any help would be appreciated.

My thanks
Rog