| Package | flare.vis.controls |
| Class | public class HoverControl |
| Inheritance | HoverControl Control flash.events.EventDispatcher |
This control also provides multiple policies on how the drawing order
of items may be affected by a hover event. By default no changes are made
(DONT_MOVE). The MOVE_TO_FRONT policy moves a
hovered-over item to the end of its parent container's
children list, such that it is drawn over its sibling items. Upon roll-out
the item is left at the top of the list, such that the order of items
partially reflects the order of mouse visits. The
MOVE_AND_RETURN policy moves items to the top as well, but
returns them to their original index upon roll-out.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | filter : Function Boolean function indicating the items considered by the control.
| Control | |
| movePolicy : int The policy for moving items forward when highlighted.
| HoverControl | ||
![]() | object : InteractiveObject The interactive object this control is attached to.
| Control | |
| Method | Defined by | ||
|---|---|---|---|
|
HoverControl(filter:* = null, movePolicy:int, rollOver:Function = null, rollOut:Function = null)
Creates a new HoverControl.
| HoverControl | ||
|
attach(obj:InteractiveObject):void
Attach this control to the given interactive object.
| HoverControl | ||
|
detach():InteractiveObject
Detach this control.
| HoverControl | ||
| Constant | Defined by | ||
|---|---|---|---|
| DONT_MOVE : int = 0 [static] Constant indicating that objects hovered over should not be moved
within their parent container changed.
| HoverControl | ||
| MOVE_AND_RETURN : int = 2 [static] Constant indicating that objects hovered over should be moved to
the front of their parent container and then returned to their
previous position when the mouse rolls out.
| HoverControl | ||
| MOVE_TO_FRONT : int = 1 [static] Constant indicating that objects hovered over should be moved to
the front of their parent container and kept there.
| HoverControl | ||
| movePolicy | property |
movePolicy:int [read-write] The policy for moving items forward when highlighted.
One of DONT_MOVE, MOVE_TO_FRONT, or
MOVE_AND_RETURN.
public function get movePolicy():int
public function set movePolicy(value:int):void
| HoverControl | () | constructor |
public function HoverControl(filter:* = null, movePolicy:int, rollOver:Function = null, rollOut:Function = null)Creates a new HoverControl.
Parametersfilter:* (default = null) — a Boolean-valued filter function indicating which
items should trigger hover processing
|
|
movePolicy:int — indicates which policy should be used for changing
the z-ordering of hovered items. One of DONT_MOVE (the default),
MOVE_TO_FRONT, or MOVE_AND_RETURN.
|
|
rollOver:Function (default = null) — an optional SelectionEvent listener for roll-overs
|
|
rollOut:Function (default = null) — an optional SelectionEvent listener for roll-outs
|
| attach | () | method |
public override function attach(obj:InteractiveObject):voidAttach this control to the given interactive object. This method will automatically detach if already attached to another object.
Parametersobj:InteractiveObject — the display object to attach to
|
| detach | () | method |
public override function detach():InteractiveObjectDetach this control.
ReturnsInteractiveObject — the interactive object this control was attached to,
or null if this control was not attached.
|
| add | event |
| remove | event |
| DONT_MOVE | constant |
public static const DONT_MOVE:int = 0Constant indicating that objects hovered over should not be moved within their parent container changed.
| MOVE_AND_RETURN | constant |
public static const MOVE_AND_RETURN:int = 2Constant indicating that objects hovered over should be moved to the front of their parent container and then returned to their previous position when the mouse rolls out.
| MOVE_TO_FRONT | constant |
public static const MOVE_TO_FRONT:int = 1Constant indicating that objects hovered over should be moved to the front of their parent container and kept there.