7: Open a Window
"7: Open a Window" behavior
What it does
This behavior opens a window or the root of a menu system. You should
make sure that when the user clicks a sprite with this behavior, the
multi-sprite it tries to open is instantiated. If it isn't instantiated,
WFS opens an alert dialog box to help you debug.
If you want to open a submenu, use the Menu
Verb behavior, not this one.
What to attach it to
The sprite you drop this on can be any sprite. It doesn't have to be
part of a multi-sprite.
The Parameter Dialog Box
When you drag the
"7: Open a Window" behavior onto a sprite, the following dialog
box opens. Click on a particular item for documentation on it.

What event should open the multi-sprite?
The first drop down, which defaults to "mouseUp", determines
what mouse event will open the window. Note that the options are:
- mouseEnter
- mouseDown
- mouseUp
- mouseLeave
- rightMouseDown (Control+click in Macs)
Of note is the "rightMouseDown" option. You can open windows
with rightMouseDown (Control+click in Macs), but usually this is reserved
for opening pop-up menus (using the
"Menu Verb" behavior on menu
items), which Windows For Shockwave supports in menu creation. However,
if you select "rightMouseDown" then you need to uncheck the
File > Publish Settings > Shockwave Save > Context Menu checkbox. This
is so the Shockwave Context Menu is not displayed when you right click
in the final Shockwave piece, if you are making Shockwave (versus a
Projector).
The reason that opening on rightMouseDown is generally reserved for
a pop-up menu is that, typically, in applications that employ right
mouse pop-up menus, the way to close the pop-up is to click away from
the menu or click on a menu item. And that's how menus behave in WFS.
Whereas to close a window, you generally provide a button on the window
that closes the window.
Name of the multi-sprite you want to open.
Specify the name of the multi-sprite you want to open. Make sure that
this multi-sprite is instantiated whenever the user can click to open
the window. If it isn't, WFS will issue you an error message to help
you debug.
Specify where you want the multi-sprite opened
The box that defaults to "Do not move it, just open it" contains
the following options:
- Do not move it, just open it.
- Center it.
- Open it where mouse is.
- Open at absolute location.
The "Do not move it, just open it" option opens the multi-sprite
where you designed it to be, or where it was when the user last moved
it, if it has a handle that allows the user to drag it around.
The "Center it" option centers it on the stage every time
this behavior opens the multi-sprite. Be aware that WFS uses the multi-sprite
background sprite as the reference sprite to center the multi-sprite.
The background sprite is the first Element below the Manager in the
Score.
The "Open it where mouse is" option opens it so that the
top left point of the multi-sprite background sprite (the sprite right
after the Window Manager in the Score) is where the mouse is.
The "Open at absolute location" option opens the multi-sprite
so that the top left point of the multi-sprite background sprite (the
sprite right after the Window Manager in the Score) is at the absolute
point you specify with the two sliders in the Parameter Dialog Box.
If you chose 'Open at absolute location', specify horizontal
value
If you specify "Open at absolute location", then and only
then do you need to set the last two options in the dialog box that
have sliders associated with them. Setting the sliders has no effect
unless "Open at absolute location" is selected. This particular
slider sets the horizontal value of the absolute point at which the
multi-sprite will be opened.
If you chose 'Open at absolute location', specify vertical
value
If you specify "Open at absolute location", then and only
then do you need to set the last two options in the dialog box that
have sliders associated with them. Setting the sliders has no effect
unless "Open at absolute location" is selected. This particular
slider sets the vertical value of the absolute point at which the multi-sprite
will be opened.
|