SWF to SWF communication from separate browser windows

I hope somebody could shed some light on this issue for me.

Assets are the following:
• An index.html with index.swf embedded
• A gallery.html with gallery.swf embedded
• Gallery.swf has 5 different images
Please Note: These are just example assets and files. The real files are much more complicated than this but this way its easier communicate my requirements.

I need an .swf file in one browser to tell another .swf file to start at a particular frame when it loads.

Once the index.html loads the index.swf file, 5 buttons will appear. Each of those buttons need code on them that loads the gallery.html in the same window and initiates the gallery.swf file at a particular frame, which will be relevant to the button clicked.