The same swf file on many pages to show different gallery

Is this possible with query string method.I have XLM gallery that reads date from single file for single gallery.I want to be able to use the same swf file on many pages to show different images.Can the code be rewritten so It can read from multiple XLM depending of the page string.Thanks for help