Class fvaswing.effects.FvFade

Description

Fade effect on AsWing components

Animates the alpha property of a component, either from transparent to opaque, or from opaque to transparent.

Example

   public function test() : Void
   {
     var button : JButton = new JButton( "move button" );
     
     var effect : FvFade = new FvFade( button );
     effect.addEventListener( FvEffectEvent.onEffectEndEVENT, this, _onEnd );
     effect.alphaTo = 0;
     
     effect.play();
   }
 

Field Index

alphaFrom, alphaTo

Inherited from FvTweenEffect

Method Index

new FvFade()
end(), fadeIn(), fadeOut(), play()

Constructor Detail

FvFade

public function FvFade(t:Component)

Constructor.

Parameters

tAsVing component target

Field Detail

alphaFrom

public alphaFrom:Number
Initial transparency level between 0 and 100, where 0 means transparent and 100 means fully opaque.

alphaTo

public alphaTo:Number
Final transparency level, where 0 means transparent and 100 means fully opaque.

Method Detail

fadeIn

static public function fadeIn(t:Component):FvFade

Returns a predefined Fade effect where alpha property is animated from transparent to opaque.

Parameters

fadeOut

static public function fadeOut(t:Component):FvFade

Returns a predefined Fade effect where alpha property is animated from opaque to transparent.

Parameters

play

public function play():Void

Starts effect.

Stores current alpha for loop process.

end

public function end():Void

Ends effects.

Overloads FvTweenEffect.end method.