ScrollBarManager
Manager of a ScrollBar
, depending on the mouse wheel.
When an instance of this class is created, it automaticall register it
to the Mouse events, using Mouse.addListener(this)
into the constructor. If
you want to unregister an instance from the Mouse events, just call the dispose() method.
public function ScrollWheelButton(button:MovieClip, scrollValue:Number)
Create a new ScrollWheelButton.
Note that if scrollValue
is set to null
, when the onMouseWheel
event
will be called, the delta will be used for the scroll.
button | The clip to set as button. |
scrollValue | The value to scroll or null .
|
Error | If button is null .
|
public scrollValue:Number
Determine the speed of the scroll when the button is pressed.
If this value is null
, then when the
onMouseWheel() event will be called, the
delta will be used as the scroll value.
public function setEnabled(value:Boolean):Void
Set if the ScrollWheelButton
is enabled or not.
When the ScrollWheelButton
is enabled, it is
registered within the Mouse.addListener
method and
it will receive the events dispatched by the mouse. If you
set false
, the Mouse.removeListener
method
will be called.
value | true to enable the ScrollWheelButton , false otherwise.
|
setEnabled() in ch.component.scrollbar.AbstractScrollBarManager
public function onMouseWheel(delta:Number, target:MovieClip):Void
Manage the scroll.
This method is called by the Mouse when the onMouseWheel event
is performed. Note that if scrollValue is null
, the
delta
will be used as the scroll value.
delta | A number indicating how many lines should be scrolled. |
target | A parameter that indicates the topmost movie clip instance under the mouse pointer when the mouse wheel is rolled. |
public function toString(Void):String
Represent the current instance into a String.
A String representing the ScrollWheelButton instance.
toString() in ch.component.scrollbar.AbstractScrollBarManager