Click to go to the home page.

This Document
"5: Close My Window" Behavior
Parameter Dialog Box

See Also
"Close A Window" Behavior
Writing Mouse Handlers


Site Nav

css drop down menu by

5: Close My Window

"5: Close My Window" Behavior

Click to go to top of this section. What it does

Closes a window or the root of a menu. Like the name of it implies, it closes the multi-sprite it is part of. This is a little different from the "Close a Window" behavior. That one doesn't have to be part of the multi-sprite it closes. But "5: Close My Window" doesn't need to ask you which multi-sprite you want closed; it assumes you want to close the multi-sprite it is part of. So it's a little more convenient to use in some cases.

This behavior is used in various places in the demo, like in scenes 4 and 8 to close the little gray windows. To find it used in the demo DIR file, open the WFS 4 cast in the Cast window, right-click on the "5: Close My Window" behavior, and select "Find in Score".

Click to go to top of this section. What to attach it to

Attach this to Window Elements that are part of a window, or part of a root menu.

Attach this to Window Elements you want to act as buttons to close their own multi-sprite.

If you want to close a multi-sprite with a button that isn't part of the multi-sprite you want to close, use the "Close a Window" behavior.

Submenus of menus close automatically via the "Menu Verb" behavior.

Click to go to top of document. The Parameter Dialog Box

When you drag and drop a copy of the "5: Close My Window" behavior on a Window Element, the following dialog box opens:

This allows you to choose whether the multi-sprite will be closed on mouseEnter, mouseDown, mouseUp, or mouseLeave.

Note that the mouseLeave option works OK if there are no other sprites over the target sprite, but if there are sprites over the sprite you drop this behavior on, then you will have to check it out and see if it works OK in all circumstances.


Click to go to the home page5: Close My Window