The Challenge:
I’m trying to run the Kirupa “centered pop-up window” script for 5 different buttons within the same swf. For clarity sake, it’s an “artists gallery” page with 5 different artists shown. Their heads are different buttons within one swf file on the page, so I need to be able to use this script for MULTIPLE buttons within the same swf.
If you click on an artist, it is supposed to open a centered pop-up window that show’s that artist’s gallery. If you (without closing the pop up) go back to the parent window with the artist’s gallery buttons and choose a different artist, I want their gallery to replace the content in the pop-up window.
What’s Going Wrong:
The script works fine for the first button, the pop-up comes up centered with the correct content in it.
HOWEVER, if you (without closing the popup), go back to the parent window and click any of the other 4 buttons (all 5 buttons contain the pop-up script, each button calling a different html page into the popup), they bring up the same centered pop-up window, with the content in the pop up window from the first button pushed, not with the new content the new button is calling for that window. If you close the pop-up, THEN click a new button on the parent page, the pop-up THEN will open with correct pop-up content. But only if you first close the pop-up before clicking a different button.
How do I get this to work? I’ve searched every site on the web for an answer on how to modify Kirupa’s script to make this work, but I can’t find an answer anywhere. It seems like it’d be easy, but I’m no actionscript guru. But I’m about to miss a deadline over it, so if anyone knows how, I’ll worship you forever.