Utility that provides touch and mouse wheel scrolling capabilities for any interactive display object.
1.0.0
.Constructor
Variables
read onlycontentHeight:Float = 0.0
The height of the target's content. Will not scroll unless the height of the content is larger than the height of the target.
1.0.0
.read onlycontentWidth:Float = 0.0
The width of the target's content. Will not scroll unless the width of the content is larger than the width of the target.
1.0.0
.decelerationRate:Float = 0.998
This value is used to decelerate the scroller when "thrown". The
velocity of a throw is multiplied by this value once per millisecond to
decelerate. A value greater than 0.0 and less than 1.0 is expected.
1.0.0
.read onlydraggingX:Bool = false
Determines if a touch is dragging the target horizontally (on the x-axis).
1.0.0
.read onlydraggingY:Bool = false
Determines if a touch is dragging the target vertically (on the y-axis).
1.0.0
.ease:IEasing = Quart.easeOut
The easing function to use when animating the scroll position.
1.0.0
.elasticEdges:Bool = true
Determines if the scrolling can go beyond the edges of the viewport and snap back to the minimum or maximum when released.
1.0.0
.See:
elasticSnapDuration:Float = 0.5
The duration, measured in seconds, of the animation when a the scroller snaps back to the minimum or maximum position after going out of bounds.
If elasticEdges is false, this property is ignored.
1.0.0
.elasticity:Float = 0.33
If the scroll position goes outside the minimum or maximum bounds when
the scroller's content is being actively dragged, the scrolling will be
constrained using this multiplier. A value of 0.0 means that the
scroller will not go beyond its minimum or maximum bounds. A value of
1.0 means that going beyond the minimum or maximum bounds is
completely unrestrained.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
Scroller.elasticEdges
enabledX:Bool = true
Determines if the target can be scrolled horizontally (on the x-axis).
1.0.0
.enabledY:Bool = true
Determines if the target can be scrolled vertically (on the y-axis).
1.0.0
.forceElasticBottom:Bool = false
Forces elasticity on the bottom edge, even if the height of the target's content is not larger than the width height the target.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
forceElasticLeft:Bool = false
Forces elasticity on the left edge, even if the width of the target's content is not larger than the width of the target.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
forceElasticRight:Bool = false
Forces elasticity on the right edge, even if the width of the target's content is not larger than the width of the target.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
forceElasticTop:Bool = false
Forces elasticity on the top edge, even if the height of the target's content is not larger than the width height the target.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
minDragDistance:Float = 6.0
The minimum distance, measured in pixels, that the target must be dragged to begin scrolling.
1.0.0
.mouseWheelDelta:Float = 10.0
The distance to scroll when the mouse wheel is scrolled.
1.0.0
.simulateTouch:Bool = false
Determines if mouse events should be treated like touch events.
1.0.0
.throwElasticity:Float = 0.05
If the scroll position goes outside the minimum or maximum bounds when
when the scroller's content is "thrown", the scrolling will be
constrained using this multiplier. A value of 0.0 means that the
scroller will not go beyond its minimum or maximum bounds. A value of
1.0 means that going beyond the minimum or maximum bounds is
completely unrestrained.
If elasticEdges is false, this property is ignored.
1.0.0
.See:
Scroller.elasticEdges
Scroller.elasticity
read onlyvisibleHeight:Float = 0.0
The height of the target's scrollable region.
1.0.0
.Methods
setDimensions (?visibleWidth:Float, ?visibleHeight:Float, ?contentWidth:Float, ?contentHeight:Float):Void
Updates the dimensions of both the target and its content.
1.0.0
.