MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 883

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

The best way to instantiate a window is to call
creates a window that can be modal (overlapping and disabling existing objects in an application)
or nonmodal. For example, the following code creates a modal Window instance (the last
parameter indicates modality):
var newWindow = PopUpManager.createPopUp(this, Window, true);
Flash simulates modality by creating a large transparent window underneath the Window
component. Because of the way transparent windows are rendered, you may notice a slight
dimming of the objects under the transparent window. You can set the effective transparency by
changing the
_global.style.modalTransparency
(opaque). If you make the window partially transparent, you can also set the color of the window
by changing the Modal skin in the default theme.
If you use
PopUpManager.createPopUp()
Window.deletePopUp()
example, if you use the close button in the window, you would write the following code:
obj.click = function(evt){
this.deletePopUp();
}
window.addEventListener("click", obj);
Note: Code does not stop executing when a modal window is created. In other environments (for
example, Microsoft Windows), if you create a modal window, the lines of code that follow the creation
of the window do not run until the window is closed. In Flash, the lines of code are run after the
window is created and before it is closed.
Each component class has a
available only on the class itself. The
of the component. To access this property, use the following code:
trace(mx.containers.Window.version);
Note: The code
trace(myWindowInstance.version);
Method summary for the Window class
The following table lists the method of the Window class.
Method
Window.deletePopUp()
Methods inherited from the UIObject class
The following table lists the methods the Window class inherits from the UIObject class. When
calling these methods from the Window object, use the form
Method
UIObject.createClassObject()
UIObject.createObject()
PopUpManager.createPopUp()
to create a modal window, you must call
to remove it to so that the transparent window is also removed. For
property, which is a class property. Class properties are
version
property returns a string that indicates the version
version
Description
Removes a window instance created by
PopUpManager.createPopUp()
Description
Creates an object on the specified class.
Creates a subobject on an object.
value from 0 (fully transparent) to 100
returns
.
undefined
.
WindowInstance.methodName
Window component
. This method
.
883

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents