Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
· Listen on a socket using the new AIR 2 server socket support (with the Socket Server class within the flash.net package). This means that you can send and receive data over a TCP socket without having to initiate a socket connection. Moreover, in this chapter you'll learn how to interact with and manage the windows of your main application, and learn some basics of working efficiently and seamlessly on remote systems. 20.1 Close All Open Windows at Once Problem You want to close all the open windows when the main application window is closed. Solution Listen for the closing event ( Event.CLOSING ), cancel the close operation, and loop through all the open windows to close them manually. Discussion When building a multiwindow application, you may need to provide the ability to close all open windows when the main application window is closed. By calling the preventDefault() method of the Event class, you can cancel the default