Class ch.component.scrollbar.ScrollClickButton

Implemented Interfaces

ScrollBarManager ScrollListener

Description

Represent a button that manage a ScrollBar by being clicked.

Field Index

autoDesactivate, autoScroll, scrollValue, SPEED_SCROLL

Method Index

new ScrollClickButton()
getClip(), onPress(), onRelease(), onReleaseOutside(), scrollPerformed(), setEnabled(), toString()

Inherited from AbstractScrollBarManager

Constructor Detail

ScrollClickButton

public function ScrollClickButton(button:MovieClip, scrollValue:Number, autoDesactivate:Boolean)

Create a new ScrollClickButton.

Parameters

buttonThe clip to set as button.
scrollValueThe value to scroll.
autoDesactivateIf the button should automatically activate/deactivate

Throws

ErrorIf button is null.
ErrorIf scrollValue is null.

Field Detail

SPEED_SCROLL

static public SPEED_SCROLL:Number [Read Only]
Determine the speed of the interval (in ms) to perform a scroll when the autoScroll delay is over. The scroll value can be adjusted with the scrollValue variable.

Constant value : 40.

scrollValue

public scrollValue:Number
Scroll value.

Determine the speed of the scroll when the button is pressed.

autoScroll

public autoScroll:Number
Time to wait before automatic scroll.

By default, this value is 400.

autoDesactivate

public autoDesactivate:Boolean
Define if the button should automatically activate/deactivate.

Method Detail

setEnabled

public function setEnabled(value:Boolean):Void

Set if the ScrollDragButton is enabled or not.

Parameters

value true to enable the ScrollDragButton, false otherwise.

Overrides

setEnabled() in ch.component.scrollbar.AbstractScrollBarManager

getClip

public function getClip(Void):MovieClip

Get the button clip.

Return

The clip.

scrollPerformed

public function scrollPerformed(event:ScrollEvent):Void

Method called when a scroll is performed on a ScrollBarModel.

Parameters

eventThe event object.

Specified By

scrollPerformed() in ch.component.scrollbar.ScrollListener

onRelease

public function onRelease(Void):Void

Action onRelease of the clip.

onPress

public function onPress(Void):Void

Action onPress of the clip.

onReleaseOutside

public function onReleaseOutside(Void):Void

Action onReleaseOutside of the clip.

toString

public function toString(Void):String

Represent the current instance into a String.

Return

A String representing the ScrollClickButton instance.

Overrides

toString() in ch.component.scrollbar.AbstractScrollBarManager