Window component
A Window component displays the contents of a movie clip inside a window with a title bar, a
border, and an optional close button.
A Window component can be modal or nonmodal. A modal window prevents mouse and
keyboard input from going to other components outside the window. The Window component
also supports dragging; a user can click the title bar and drag the window and its contents to
another location. Dragging the borders doesn't resize the window.
A live preview of each Window instance reflects changes made to all parameters except
contentPath in the Property inspector or Component inspector during authoring.
When you add the Window component to an application, you can use the Accessibility panel
to make it accessible to screen readers. First, you must add the following line of code to
enable accessibility:
mx.accessibility.WindowAccImpl.enableAccessibility();
You enable accessibility for a component only once, regardless of how many instances you have of
the component. For more information, see Chapter 17, "Creating Accessible Content," in Using
Flash.
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
UIObject.createClassObject()
a window to an application is to use the
modal windows that overlap other objects on the Stage. For more information, see
class" on page
882.
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
custom focus navigation" on page 50
Window parameters
You can set the following authoring parameters for each Window component instance in the
Property inspector or in the Component inspector:
contentPath
specifies the contents of the window. This can be the linkage identifier of the movie
clip or the symbol name of a screen, form, or slide that contains the contents of the window. This
can also be an absolute or relative URL for a SWF or JPEG file to load into the window. The
default value is
""
878
Chapter 6: Components Dictionary
) to add a window to an application. The third way of adding
or
. Loaded content is clipped to fit the window.
Components Dictionary
createClassObject()
PopUpManager
class. Use the Popup Manager to create
"FocusManager class" on page
CHAPTER 6
(see
"Window
"Creating
419.
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers