Class fvaswing.effects.FvScale

Description

Scale effect on AsWing components

Effect changes the width / height of a target over a specified time interval. You can specify the initial width / height with the xFrom and yFrom values, the destination values with xTo and yTo, or the number of pixels to add with xBy and yBy.

If you specify any two of the values (initial width, destination, or amount to add), FvScale calculates the third.
If you specify all three, Fever ignores the xBy and yBy values.
If you specify only the xTo and yTo values or the xBy and yBy values, FvScale sets xFrom and yFrom to be the object's current size.

Example

   public function test() : Void
   {
     var button : JButton = new JButton( "move button" );
     
     var effect : FvScale = new FvScale( button );
     effect.addEventListener( FvEffectEvent.onEffectEndEVENT, this, _onEnd );
     effect.xTo = 300;
     effect.yTo = 200;
     effect.easing = Elastic.easeOut;
     
     effect.play();
   }
 

Field Index

xBy, xFrom, xTo, yBy, yFrom, yTo

Inherited from FvTweenEffect

Method Index

new FvScale()
end(), play()

Constructor Detail

FvScale

public function FvScale(t)

Constructor.

Parameters

tAsVing component target

Field Detail

xBy

public xBy:Number
Number of pixels to add to current component width.

xFrom

public xFrom:Number
Initial component's width.

xTo

public xTo:Number
Destination width.

yBy

public yBy:Number
Number of pixels to add to current component height.

yFrom

public yFrom:Number
Initial component's height.

yTo

public yTo:Number
Destination height.

Method Detail

play

public function play():Void

Starts effect.

Stores current size for loop process.

end

public function end():Void

Ends effects.

Overloads FvTweenEffect.end method.