// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved.
package fl.events {
import flash.events.Event;
/**
* The student_ar_fl_events_ScrollEvent class defines the scroll event that is associated with the ScrollBar component.
*
* @see fl.controls.ScrollBar ScrollBar
* @see fl.controls.ScrollBarDirection ScrollBarDirection
* @see fl.core.UIComponent UIComponent
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public class student_ar_fl_events_ScrollEvent extends Event {
/**
* Defines the value of the type
property of a scroll
* event object.
*
*
This event has the following properties:
*Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default
* behavior to cancel. |
currentTarget | The object that is actively processing * the event object with an event listener. |
delta | 1 ; a value that indicates
* how much scrolling was done.
* |
direction | vertical ; the direction of the
* ScrollBar. |
position | 0 ; the position of the
* Scrollbar thumb after it was moved. |
target | The object that dispatched the event. The target is
* not always the object listening for the event. Use the currentTarget
* property to access the object that is listening for the event. |
ScrollBarDirection.HORIZONTAL
indicates horizontal movement; a value of
* ScrollBarDirection.VERTICAL
indicates vertical movement.
*
* @param delta The change in scroll position, in pixels. A positive value indicates that the direction
* of the scroll was down or to the right. A negative value indicates that the
* direction of the scroll was up or to the left.
*
* @param position The current scroll position.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function student_ar_fl_events_ScrollEvent(direction:String, delta:Number, position:Number) {
super(student_ar_fl_events_ScrollEvent.SCROLL,false,false);
_direction = direction;
_delta = delta;
_position = position;
}
/**
* Gets a constant value that indicates the direction of movement associated with the event.
* A value of ScrollBarDirection.HORIZONTAL
indicates horizontal movement; a value
* of ScrollBarDirection.VERTICAL
indicates vertical movement.
*
* @see fl.controls.ScrollBarDirection
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function get direction():String {
return _direction;
}
/**
* Gets the size of the change in scroll position, in pixels. A positive value
* indicates that the direction of the scroll was down or to the right. A negative value indicates that
* the direction of the scroll was up or to the left.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function get delta():Number {
return _delta;
}
/**
* Gets the current scroll position, in pixels.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function get position():Number {
return _position;
}
/**
* Returns a string that contains all the properties of the student_ar_fl_events_ScrollEvent object. The
* string has the following format:
*
* [student_ar_fl_events_ScrollEvent type=value bubbles=value
* cancelable=value direction=value delta=value
* position=value
]