AQMoveRel

Kind of class:class
Inherits from:none
Author:Arthur Clemens
Classpath:org.asapframework.util.actionqueue.AQMoveRel
File last modified:Thursday, 12 October 2006, 11:19:40
ActionQueue method that moves a movieclip over a relative distance.

Summary


Class properties
  • START_VALUE : Number
    • Start animation value to be returned to the perform function.
  • END_VALUE : Number
    • End animation value to be returned to the perform function.
Class methods
  • move (inMC:MovieClip, inDuration:Number, inRelX:Number, inRelY:Number, inEffect:Function) : ActionQueuePerformData
    • Moves a movieclip over a relative distance, making it easy to change the direction while moving.

Class properties

END_VALUE

static private END_VALUE:Number = 1
(read)

End animation value to be returned to the perform function.

START_VALUE

static private START_VALUE:Number = 0
(read)

Start animation value to be returned to the perform function.

Class methods

move

static function move (
inMC:MovieClip, inDuration:Number, inRelX:Number, inRelY:Number, inEffect:Function) : ActionQueuePerformData

Moves a movieclip over a relative distance, making it easy to change the direction while moving. The end location is approximated - for precize control over the end location, use AQMove.move.
Parameters:
inMC :
movieclip to move
inDuration:
length of animation in seconds; 0 is used for perpetual animations - use -1 for instant change
inRelX :
the x distance the clip should travel
inRelY :
the y distance the clip should travel
inEffect :
(optional) An effect function, for instance one of the mx.transitions.easing methods. Arguments to pass the effect function may be appended as a comma-separated list.
Returns:
  • A new ActionQueuePerformData object.
Example:
  • This example lets a movieclip travel (-40, 15) pixels over a timeframe of 2 seconds, with an ease in effect:
    queue.addAction( AQMoveRel.move, my_mc, 2, -40, 15, Regular.easeIn );