Windows

I have three windows like in the tutorial about sawping depths and i put an X button on the cornor so you can close them with the action of

on (press) {
removeMovieClip(_root.window3);
}

but you have to like click on the window first then hit the x so is ther a way to make it close whithout having to click on thw windo first ?

thanks

Flash fool :bandit:

on (press) {
removeMovieClip(_root.window3);
}

should be

on (release) {
removeMovieClip(_root.window3);
}

No, that didn’t work ether I think it is because of the code for making it swap depths?

i dont know, what is the code for swap depths ?

on (press, dragOver) {
startDrag(_root.window2);
}
on (release, rollOut, dragOut) {
stopDrag();
}
on (press, release, dragOver, dragOut) {
_root.x +=2;
_root.window2.swapDepths(_root.x);
}