Help with pop-up window

Whatsup?

I’m making a site and on the site I’ve got a contact button.
I want a pop-up window to appear when my visitors click on the button.
I don’t mean a new window on their browser, but just a window on the flash site.

What code do I use so the window appear when the button is clicked? I don’t want it to change to another frame in the timeline. Just a window popping up in the same frame. And I want a close button on the window so when that button is clicked you’ll just close the window without going to a new frame.

Hope you got it! I’ll try to illustrate it with some images if you don’t understand;) Thanks:D

You need to attach a MovieClip.

  1. Make the “window”, press F8 to make it a MovieClip, then delete it form the stage so it’s still in your library
  2. right click on it in the library and click “linkage”, then click “export for actionscript”. Give it a good identifier name.
    3.then in the main movie, put this code on the button:
on (release){
   attachMovie("linkageidentifier", "somename", getNextHighestDepth());
}

(replace “linkageidentifier” with the name you gave it. “somename” is the instance name for it, you can use this the refer to this clip later)

Thanks! that worked fine:D
But what code do I write on the “close” button on the “window”?
So the “window” disapears. And how do I decide the position of the “window”? Now it just appears over the contact-button. I want it to appear someplace else.

Thanks alot:)

great job…

but it is not movable.
if ı want to move it somewhere inside explorer with mouse?

forget it. thats not so important, the location of the window I mean.

But how do I close the window again? I’ve got a close button in the same movieclip as the window. And what code do I use so I can close the window and sort of send it back to the library so it disappears?
Is there a code instead of this:

on (release){
attachMovie(“linkageidentifier”, “somename”, getNextHighestDepth());
}

-that sort of detach the movie? Something like this?:

on (release){
detachMovie(“linkageidentifier”, “somename”, getNextHighestDepth());
}

I don’t want the window there all the time of course…

Please! I really need to know this one guys;)

you can do the same with “loadMovie” function. And when you want to close winndow. you can use unload() function…

that’s all i think. … you dont need to use this attachmovie function… it is silly i think…

Ummm… loadmovie is for loading external clips, not things in the library.

I was not replying in hopes that he might crack open the Flash help and realize it is a great resource. Heres a little hint:
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary578.html

thanks guys!

ok. thanks defective…