BiAnimationRange
Defines a value range, used by BiComponentAnimation, when animating.
You specify a start and an end value that will be animated.
You also specify the duration/time, in ms, that it should take to animate the value range.
There are several different acceleration behaviors/types that you can choose from.
BiAnimationRange has the ability to progress (displace) the current value, within the animation range.
This class extends
BiObject
and therefore all methods and fields available for
BiObject
are also available for
BiAnimationRange
.
Constructor
new
BiAnimationRange
(
[
nStartValue
[
,nEndValue
[
,nAccType
[
,nTime
]
]
]
]
)
Parameters
| Name | Type | Optional | Default | Descripton |
nStartValue |
Number |
![]() |
0 |
Lower end of value range |
nEndValue |
Number |
![]() |
0 |
Upper end of value range |
nAccType |
Number |
![]() |
BiComponentAnimation.CONSTANT_SPEED |
Acceleration type for this range |
nTime |
Number |
![]() |
500 |
The time it takes in ms to animate the whole range |
Properties
Methods
| Name | Description |
displace |
Makes the current position progress, using currently set acceleration algorithm. |
positionAtMax |
Determines if current position has reached the end of this value range. |
rewind |
Resets current value |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
Method Details
displace
Makes the current position progress, using currently set acceleration algorithm.
Syntax
object.displace
(
curMs
)
Parameters
| Name | Type | Optional | Default | Descripton |
curMs |
Number |
This animation range has currently been animated for curMs milliseconds. |
Return Type
Current position within value range, rounded.
positionAtMax
Determines if current position has reached the end of this value range.
Syntax
object.positionAtMax ( )
Parameters
No arguments.
Return Type
true if the current position (rounded) equals the mamimum upper boundry of this range.
rewind
Resets current value
Syntax
object.rewind ( )
Parameters
No arguments.
Return Type
void
