Actionscript Pop up movie clip?

I am using this script to open a movie clip as a pop up window.

on (press) {
this.attachMovie(“mypopmc”, “window”, 0);
window._x = 250;
window._y = 150;
}
the script works fine.

my problem is i need a script that will open a second pop up window over the first one once they click on a certain button in the first pop up window.
when the second pop up window opens up it will play a animation then close(on its own) leaving only the first pop up window.

I am also looking for a second script that when the user clicks on a certain button in the first pop up window, the first pop up window will close then a second pop up window will open play an animation then close on its own.

and when i say pop up window i mean a pop up movie clip.

thank you for any help.