How to "close" a drag-able window"

I’m new to this…so forgive me.

I have at least figured out…:blush: how to make a movie clip drag-able.
The problem I’m having is how to close it…

In other words…I’ve got a frame…with some content…picture…some text. and a close button on it…all contained in a movie clip

but when I execute the program…the window drags around just fine…but I can’t click on the button…
plus…what actions should the button have …to get rid of the movie clip…that it’s attached to?

Making sense?

Please help.

Thanks

i’ll leave the specifics to the codemasters who roam around here,
but I would think an unLoadMovie command on the button would
do the trick. I could be wrong though.

That’s exactly how you would do it. You would load an external swf or a mc from your library and then unload it with the close button.

I guess another option you could use without unloading the mc is just using the _visible = 0 property.

Look up the following terms in the actionscript dictionary

Loads/unloads external swf to an empty mc
loadMovie
unloadMovie

Loads/unloads external swf to a level
loadMovieNum
unLoadMovieNum

Loads/unloads from library
attachMovie
removeMovieClip

ok…thanks for the responses…

but…I guess my problem is in the “construction” of the movie clip itself.

It’s simply a box…with a “X” in the top right corner.
the “X” is a button.

My problem is: you can’t click on the “X”…the button simply doesn’t work.
It’s like it doesn’t recognize it.

doesn’t the button and whatever else have to be in the actual movie clip? so it can all drag together?

If your button is in a movieclip on the main tmeline use
_root.unloadMovie to control the main timeline…

What’s the url of what you have???

ok guys…I really need some help?

Please?

:sigh:

my problem…it seems…is…I create a movie clip…with a button on it…or whatever.
That all works.
But as soon as I give the movie clip the “onPress” “startDrag” option…my button…no longer seems to be a button…because it’s within the Movie clip?

I dunno…I’m new at this…

Please Help!!!

gosh…I’m sorry…I’m new to this…and I know I’m not making any sense…

I simply want a draggable window…and to close it…the user would click…“close” or “an X”…that’s actually on the “window”.

the example I’ve got is VERY basic…a movie clip…that has the start drag thing on it…but…within the movie clip…is a button …to close it (the movie clip)…but…the button is not clickable.

I’m sorry…I’m probably not making any sense…

but I really need help

THANKS…SO VERY MUCH…:hair:

i can’t open your file :frowning:

using mx