Ok. I've seen ALOT of crappy windows emulators around Newgrounds. A huge problem in most (besides the fact that they are annoying and/or suck) is that when there are multiple windows open, you can only see the one on top, and when you click on another that is behind it, it doesn't move above the rest. Here is the code to fix this. It goes on each window/program. Make sure you make a new layer in the program's MC named "draggable part" and make a box that will act as the part you can drag. If you want to have more than 3 programs to drag/swap layers, just add them into the array and make sure you put MY_WINDOW = _root.MY_WINDOW.getDepth();
onClipEvent(load){
this._alpha = 0;
this.useHandCursor = false;
}
onClipEvent(enterFrame){
WINDOW1 = _root.WINDOW1.getDepth();
WINDOW2 = _root.WINDOW2.getDepth();
WINDOW3 = _root.WINDOW3.getDepth();
windows = new Array(WINDOW1, WINDOW2, WINDOW3);
windows.sort();
this.onPress = function(){
_root.mines.startDrag();
_root.mines.swapDepths(windows[0]);
}
this.onRelease = function(){
_root.mines.stopDrag();
}
}
Hope that clears some stuff up for you people who want to make windows mocks.