Class fvaswing.effects.FvMove

Description

Move effect on AsWing components

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

If you specify any two of the values (initial position, destination, or amount to move), FvMove 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, FvMove sets xFrom and yFrom to be the object's current position.

Example

   public function test() : Void
   {
     var button : JButton = new JButton( "move button" );
     
     var effect : FvMove = new FvMove( button );
     effect.addEventListener( FvEffectEvent.onEffectEndEVENT, this, _onEnd );
     effect.xTo = 200;
     effect.yTo = 100;
     effect.startDelay = 2000;
     effect.easing = Bounce.easeOut;
     
     effect.play();
   }
 

Field Index

xBy, xFrom, xTo, yBy, yFrom, yTo

Inherited from FvTweenEffect

Method Index

new FvMove()
end(), play()

Constructor Detail

FvMove

public function FvMove(t)

Constructor.

Parameters

tAsVing component target

Field Detail

xBy

public xBy:Number
Number of pixels to move the components along the x axis.

xFrom

public xFrom:Number
Initial position's x coordinate.

xTo

public xTo:Number
Destination position's x coordinate.

yBy

public yBy:Number
Number of pixels to move the components along the y axis.

yFrom

public yFrom:Number
Initial position's y coordinate.

yTo

public yTo:Number
Destination position's y coordinate.

Method Detail

play

public function play():Void

Starts effect.

Stores current position for loop process.

end

public function end():Void

Ends effects.

Overloads FvTweenEffect.end method.