ActionScript 2.0 Components Language Reference |
|
|
|
| Window component > Using the Window component | |||
You can use a window in an application whenever you need to present a user with information or a choice that takes precedence over anything else in the application. For example, you might need a user to fill out a login window, or a window that changes and confirms a new password.
There are several ways to add a window to an application. You can drag a window from the Components panel to the Stage. You can also call createClassObject() (see UIObject.createClassObject()) to add a window to an application. The third way of adding a window to an application is to use the PopUpManager class. Use the Popup Manager to create modal windows that overlap other objects on the Stage. For more information, see Window class.
If you use the Popup Manager to add a Window component to a document, the Window instance will have its own Focus Manager, distinct from the rest of the document. If you don't use the Popup Manager, the window's contents participate in focus ordering with the other components in the document. For more information about controlling focus, see FocusManager class or Creating custom focus navigation in Using ActionScript 2.0 Components.
Components such as Loader, ScrollPane, and Window have events to determine when content finishes loading. To set properties on the content of a Loader, ScrollPane, or Window, add the property statement within a "complete" event handler, as shown in the following example:
loadtest = new Object();
loadtest.complete = function(eventObject){
content_mc._width= 100;
}
my_window.addEventListener("complete", loadtest)
For more information, see Window.complete.
|
|
|
|