I can't really help, but there exists an add-on for FireFox called "FlashBlock". It replaces any flash thingy with a button you can click to show the flash animation. Perhaps you can look up that add-on, and see how it works. It normally uses Javascript, so it should be helpful.