Click to go to the home page.

This Document
The "Rollover" Behavior
The Parameter Dialog Box

See Also
Writing Mouse Handlers


Site Nav

css drop down menu by


The "Rollover" Behavior

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

Attach this behavior to a sprite that you want to act as a rollover sprite, ie, when the mouse enters this sprite, a window appears, (as long as the mouse is not down on mouseEnter and the window to be opened is instantiated) and when the mouse leaves this sprite, the window disappears. You will be prompted for the name of the window you want to open when you drop this behavior on a sprite.

This behavior will not work right if the window you open is modal.

You can see this used in the demo that comes with WFS in scene 7 if you mouseover the triangle and then menu1>menu1,2. That example shows a relatively improbable use of the "Rollover" behavior: the words "rollover1" and "rollover2" are menu items that open rollover windows. Usually you'd use the "Rollover" behavior not on a menu item but a window element.

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

Attach this to the sprite you want to open the window on mouseEnter and close the window on mouseLeave.

Click to go to top of this section. Usage Notes

If you write and attach other behaviors to a sprite to which you've attached the "Rollover" behavior that, for instance, change the image or highlight the text , then the mouseEnter behavior should have the following form to be consistent with the Rollover behavior. This behavior has two mouse events: mouseEnter and mouseLeave. The mouseLeave handler closes the window unconditionally.

on mouseEnter me
     if the mouseDown = FALSE then
     end if
end mouseEnter

Click to go to top of document The Parameter Dialog Box

When you drag and drop a copy of the "Rollover" behavior on a sprite, the following dialog box opens.

You specify the name of the window you want to open.


Click to go to the home pageRollover