Occasionally you want to make an application or game that responds to its window being resized. This can be useful in a desktop environment (resizing the window) or in a browser (resizing the browser the swf is in).
For an application, I have code that closes the current window and creates a new window. How do I replace the current window with the new one and migrate what's in the old window to the new one?
Well, you can actually re-parent your document class as easily as any other display object. So to move it from one window to another you can do the following (where "this" is the reference to your document class).