Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class ScrollBar

MovieClip
  |
  +--com.bjc.core.BJCComponent
        |
        +--com.bjc.controls.ScrollBar

All Known Subclasses: HorizScrollBar, VertScrollBar

class ScrollBar
extends BJCComponent

Base class for HorizScrollBar and VertScrollBar.

Events:

change - Fired when the user changes the value of the scroll bar by clicking on the up or down button, the track area of the scroll bar or by moving the thumb.
focus - Fired when the component receives focus, usually by the user interacting with it.
releaseOutside - Fired whenever the user presses and releases the mouse outside the component.
rollOver - Fired whenever the mouse moves over the component.
rollOut - Fired whenever the mouse leaves the component.


Author:
Flashloaded - www.flashloaded.com


Field Summary

public
addEventListener: Function
See the EventDispatcher Class in Flash Help

public
changeHandler: Function
Can be used to assign a direct event handler to the component instance.

public
focusHandler: Function
Can be used to assign a direct event handler to the component instance.

public
releaseOutsideHandler: Function
Can be used to assign a direct event handler to the component instance.

public
removeEventListener: Function
See the EventDispatcher Class in Flash Help

public
rollOutHandler: Function
Can be used to assign a direct event handler to the component instance.

public
rollOverHandler: Function
Can be used to assign a direct event handler to the component instance.

Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
lineScroll: Number (write)
Determines how much the scrollbar's value will change when one of the arrow buttons is clicked. If the scrollbar is being used to control something like a text area, this should probably be set to one, to cause the text to scroll one line. If it is scrolling a picture or movie clip, it should probably be set to a larger amount.

public
lineScroll: Number (read)
Gets the scroll value changed when one of the arrow buttons is clicked.

public
maximum: Number (write)
Sets the maximum value of the scrollbar. In a vertical bar, this will be the value when the thumb is all the way to the bottom of the bar; in a horizontal one, when the thumb is to the far right. You can invert the bar by making minimum higher than maximum.

public
maximum: Number (read)
Gets the maximum value of the scrollbar.

public
minimum: Number (write)
Sets the minimum value of the scrollbar. In a vertical bar, this will be the value when the thumb is all the way to the top of the bar; in a horizontal one, when the thumb is to the far left. You can invert the bar by making minimum higher than maximum.

public
minimum: Number (read)
Gets the minimum value of the scrollbar.

public
pageSize: Number (write)
Sets the amount the value will change if the user clicks above or below the thumb. If not defined, the thumb will move the distance of its width/height and the value will be computed based on how much it moved.

public
pageSize: Number (read)
Gets the amount the value will change if the user clicks above or below the thumb.

public
thumbScale: Number (write)
Sets the percentage of the available space that the thumb will take up. A value from 0 to 1. This is generally computed in a component as a percentage of visible content to total content.

public
thumbScale: Number (read)
Gets the percentage of the available space that the thumb will take up.

public
value: Number (write)
Sets the current value of the scroll bar, between minimum and maximum.

public
value: Number (read)
Gets the current value of the scroll bar, between minimum and maximum.

Properties inherited from class com.bjc.core.BJCComponent

disabledAlpha, enabled, focusTime, height, keyEnabled, style, width

Constructor

public
ScrollBar ( Void)


Methods inherited from class com.bjc.core.BJCComponent

draw, invalidate, move, remove, setSize



Field Documentation

addEventListener

public var addEventListener: Function
See the EventDispatcher Class in Flash Help

changeHandler

public var changeHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myScrollBar.changeHandler = function(){
trace("I was changed.");
}

focusHandler

public var focusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myScrollBar.focusHandler = function(){
trace("Set focus.");
}

releaseOutsideHandler

public var releaseOutsideHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myScrollBar.releaseOutsideHandler = function(){
trace("Release outside.");
}

removeEventListener

public var removeEventListener: Function
See the EventDispatcher Class in Flash Help

rollOutHandler

public var rollOutHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myScrollBar.rollOutHandler = function(){
trace("Roll out.");
}

rollOverHandler

public var rollOverHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myScrollBar.rollOverHandler = function(){
trace("Roll over.");
}


Property Documentation

lineScroll

public lineScroll: Number (write)
Determines how much the scrollbar's value will change when one of the arrow buttons is clicked. If the scrollbar is being used to control something like a text area, this should probably be set to one, to cause the text to scroll one line. If it is scrolling a picture or movie clip, it should probably be set to a larger amount.

Example:
myScrollBar.lineScroll = 20;

lineScroll

public lineScroll: Number (read)
Gets the scroll value changed when one of the arrow buttons is clicked.

Example:
myVar = myScrollBar.lineScroll;

maximum

public maximum: Number (write)
Sets the maximum value of the scrollbar. In a vertical bar, this will be the value when the thumb is all the way to the bottom of the bar; in a horizontal one, when the thumb is to the far right. You can invert the bar by making minimum higher than maximum.

Example:
myScrollBar.maximum = 100;

maximum

public maximum: Number (read)
Gets the maximum value of the scrollbar.

Example:
myVar = myScrollBar.maximum;

minimum

public minimum: Number (write)
Sets the minimum value of the scrollbar. In a vertical bar, this will be the value when the thumb is all the way to the top of the bar; in a horizontal one, when the thumb is to the far left. You can invert the bar by making minimum higher than maximum.

Example:
myScrollBar.minimum = 0;

minimum

public minimum: Number (read)
Gets the minimum value of the scrollbar.

Example:
myVar = myScrollBar.minimum;

pageSize

public pageSize: Number (write)
Sets the amount the value will change if the user clicks above or below the thumb. If not defined, the thumb will move the distance of its width/height and the value will be computed based on how much it moved.

Example:
myScrollBar.pageSize = 10;

pageSize

public pageSize: Number (read)
Gets the amount the value will change if the user clicks above or below the thumb.

Example:
myVar = myScrollBar.pageSize;

thumbScale

public thumbScale: Number (write)
Sets the percentage of the available space that the thumb will take up. A value from 0 to 1. This is generally computed in a component as a percentage of visible content to total content.

Example:
myScrollBar.thumbScale = myWindow._height / myContent._height;

thumbScale

public thumbScale: Number (read)
Gets the percentage of the available space that the thumb will take up.

Example:
myVar = myScrollBar.thumbScale;

value

public value: Number (write)
Sets the current value of the scroll bar, between minimum and maximum.

Example:
myScrollbar.value = 30;

value

public value: Number (read)
Gets the current value of the scroll bar, between minimum and maximum.

Example:
myVar = myScrollbar.value;


Constructor Documentation

ScrollBar

public function ScrollBar(Void)

The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com