BiOpacityAnimator

Animates the opacity of BiComponents to create various visual effects.

This class extends BiComponentAnimation and therefore all methods and fields available for BiComponentAnimation are also available for BiOpacityAnimator .

Constructor

new BiOpacityAnimator ( [ fMinOpacity [ ,nSpeed [ ,bLoop [ ,nAccType [ ,oComp [ ,nFrameRate [ ,bAutoStart [ ,bForward ] ] ] ] ] ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
fMinOpacityFloatchecked0.3 Opacity will never fall under this number. Ranges from 0.0 - 1.0.
nSpeedNumberchecked500 Duration of one animation cycle, measured in milliseconds. When the animation is looping, there are two cycles on a full loop. One down-cycle and one up-cycle. So a complete iteration is actually double this time.
bLoopBooleancheckedfalse Causes the animation to loop endlessly
nAccTypeNumbercheckedBiComponentAnimation.CONSTANT_SPEED Acceleration type
oCompBiComponentcheckedA component that will be animated. You can supply one later if you wish.
nFrameRateNumbercheckedBiFpsGenerator.DEFAULT_FRAME_RATE Desired number of Frames Per Second for this animation.
bAutoStartBooleancheckedfalse Start the animation immediately
bForwardBooleancheckedtrue Causes the animation to progress forward, when first started.
The status of this property changes during some types of animation. Eg. When pulsating, opacity goes up and down / back and forth.

Properties

NameTypegetsetDescripton
minOpacityvoidcheckedLimits how transparent the animated objects are allowed to be.
0.0 completely transparent, 1.0 completely opaque
speedvoidcheckedSets the duration, in milliseconds, of one animation cycle (some animation types use two cycles). The following string constants are also allowed:
slowest, slow, normal, fast, fastest
typevoidcheckedSetups common values (speed, acceleration type and loop mode) for default opacity animations. Possible values are:
pulsate, blink, fadeIn, fadeOut

Methods

None.

Events

None.

Static Methods

NameDescription
createBlinkCreates a predefined animation that causes BiComponent(s) to blink. The animation autostarts and is looping endlessly.
createFadeInFades component's from completely transparent to completely opaque. Make sure the component is allready at 0.0 opacity, if it's on screen, or it will suddenly jump down to zero. Autostarts and autodisposes.
createFadeOutFades component's from completely opaque to completely transparent. Make sure the component is allready at 1.0 opacity, if it's on screen, or it will suddenly jump down to fully opaque. Autostarts and autodisposes.
createLimitedBlinkLike blink, but only blinks a specified number of times. Autostarts and autodisposes.
createPulseCreates a predefined animation that fades BiComponent(s) in and out in a pulsating manner. The animation autostarts and is looping endlessly.

Static Fields

NameTypeDescripton
SPEED1Numberslowest
SPEED2Numberslow
SPEED3Numbernormal
SPEED4Numberfast
SPEED5Numberfastest

Remarks

The opacity animator speeds does not sync with the other animators. You can however get synchronization by manually setting the time duration to the correct values.

Static Method Details

createBlink

Creates a predefined animation that causes BiComponent(s) to blink. The animation autostarts and is looping endlessly.

Syntax

BiOpacityAnimator . createBlink ( oComp [ ,nSpeed [ ,fMinOpacity ] ] )

Parameters

NameTypeOptionalDefaultDescripton
oCompBiComponentA component that you want to animate.
nSpeedNumbercheckedBiOpacityAnimator.SPEED2 Select one of the predefined constants or supply your own value.
fMinOpacityFloatchecked0.3 0.0 means that the component will become completely transparent during animation.

Return Type

BiOpacityAnimator

createFadeIn

Fades component's from completely transparent to completely opaque. Make sure the component is allready at 0.0 opacity, if it's on screen, or it will suddenly jump down to zero. Autostarts and autodisposes.

Syntax

BiOpacityAnimator . createFadeIn ( oComp [ ,nSpeed ] )

Parameters

NameTypeOptionalDefaultDescripton
oCompBiComponentA component that you want to animate.
nSpeedNumbercheckedBiOpacityAnimator.SPEED2 Select one of the predefined constants or supply your own value.

Return Type

void

createFadeOut

Fades component's from completely opaque to completely transparent. Make sure the component is allready at 1.0 opacity, if it's on screen, or it will suddenly jump down to fully opaque. Autostarts and autodisposes.

Syntax

BiOpacityAnimator . createFadeOut ( oComp [ ,nSpeed ] )

Parameters

NameTypeOptionalDefaultDescripton
oCompBiComponentA component that you want to animate.
nSpeedNumbercheckedBiOpacityAnimator.SPEED2 Select one of the predefined constants or supply your own value.

Return Type

void

createLimitedBlink

Like blink, but only blinks a specified number of times. Autostarts and autodisposes.

Syntax

BiOpacityAnimator . createLimitedBlink ( oComp [ ,nSpeed [ ,fMinOpacity [ ,nNumBlinks ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
oCompBiComponentA component that you want to animate.
nSpeedNumbercheckedBiOpacityAnimator.SPEED2 Select one of the predefined constants or supply your own value.
fMinOpacityFloatchecked0.3 0.0 means that the component will become completely transparent during animation.
nNumBlinksNumberchecked10 Number of blinks.

Return Type

void

createPulse

Creates a predefined animation that fades BiComponent(s) in and out in a pulsating manner. The animation autostarts and is looping endlessly.

Syntax

BiOpacityAnimator . createPulse ( oComp [ ,nSpeed [ ,fMinOpacity ] ] )

Parameters

NameTypeOptionalDefaultDescripton
oCompBiComponentA component that you want to animate.
nSpeedNumbercheckedBiOpacityAnimator.SPEED2 Select one of the predefined constants or supply your own value.
fMinOpacityFloatchecked0.3 0.0 means that the component will become completely transparent during animation. 1.0 means it have full visibility.

Return Type

BiOpacityAnimator