Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class VSlider

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


class VSlider
extends BJCComponent

Vertical Slider component for choosing values.

Events:

change - Fired whenever the user moves the slider thumb, changing the value.
focus - Fired whenever the component receives focus.
killFocus - Fired whenever the component loses focus.
tabFocus - Fired whenever the component receives focus by pressing the TAB key.


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
eventOnValue: Boolean
Can be used to choose whetever the event handler will be called when the value has been set by code. This variable is set to true by default.

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

public
killFocusHandler: 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
tabFocusHandler: 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
maximum: Number (write)
Sets the maximum possible value on the slider. Note, it is possible to make a "backwards" slider by making maximum lower than minimum.

public
maximum: Number (read)
Gets the maximum possible value on the slider.

public
minimum: Number (write)
Sets the minimum possible value on the slider. Note, it is possible to make a "backwards" slider by making maximum lower than minimum.

public
minimum: Number (read)
Gets the minimum possible value on the slider.

public
useHandCursorOnTrack: Boolean (write-only)
Sets the hand cursor mode on the slider track.

public
value: Number (write)
Sets the current value of the slider. This will fire the change event if the eventOnValue is set to true (changed in version 1.3).

public
value: Number (read)
Gets the current value of the slider.

Properties inherited from class com.bjc.core.BJCComponent

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

Constructor

public
VSlider ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): VSlider
Static method used to create an instance of a VSlider on stage at run time.

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:
mySlider.changeHandler = function(){
trace("I was changed.");
}

eventOnValue

public var eventOnValue: Boolean
Can be used to choose whetever the event handler will be called when the value has been set by code. This variable is set to true by default.

Usage:
mySlider.eventOnValue = false;
mySlider.value = 0xFF0000;

focusHandler

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

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

killFocusHandler

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

Usage:
mySlider.killFocusHandler = function(){
trace("Kill focus.");
}

removeEventListener

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

tabFocusHandler

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

Usage:
mySlider.tabFocusHandler = function(){
trace("Tab focus.");
}


Property Documentation

maximum

public maximum: Number (write)
Sets the maximum possible value on the slider. Note, it is possible to make a "backwards" slider by making maximum lower than minimum.

Example:
mySlider.maximum = 100;

maximum

public maximum: Number (read)
Gets the maximum possible value on the slider.

Example:
myVar = mySlider.maximum;

minimum

public minimum: Number (write)
Sets the minimum possible value on the slider. Note, it is possible to make a "backwards" slider by making maximum lower than minimum.

Example:
mySlider.minimum = 0;

minimum

public minimum: Number (read)
Gets the minimum possible value on the slider.

Example:
myVar = mySlider.minimum;

useHandCursorOnTrack

public useHandCursorOnTrack: Boolean (write-only)
Sets the hand cursor mode on the slider track.

Example:
mySlider.useHandCursorOnTrack = true;

value

public value: Number (write)
Sets the current value of the slider. This will fire the change event if the eventOnValue is set to true (changed in version 1.3).

Example:
mySlider.value = 50;

value

public value: Number (read)
Gets the current value of the slider.

Example:
myVar = mySlider.value;


Constructor Documentation

VSlider

public function VSlider(Void)

Method Documentation

create

public static function create(target: MovieClip,
 id: String,
 depth: Number,
 initObj: Object): VSlider
Static method used to create an instance of a VSlider on stage at run time.

Parameters:
target
the movie clip to which the slider will be attached.
id
the instance name given to the new slider attached.
depth
the depth at which to attach the new slider.
initObj
(optional) an object containing any properties you want to assign to the component when it is created
Returns:
a reference to the new slider attached.

Example:
import com.bjc.controls.VSlider;
var newVSlider:VSlider = VSlider.create(_root, "myVSlider", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com