AS2 :: Animator Class

Nothing special here. This is just a helper class for the TileMaker class. It only has (1) method animate which I made static so you don't have to create instances of this class.

import mx.transitions.Tween;
import mx.transitions.easing.*;
 
class labs.otuome.effects.Animator extends MovieClip
{
 
	private function Animator(){super();}
 
	static public function animate(clip:MovieClip,newx:Number,newy:Number,tweenType:Function)
	{
		var xTween:Tween =  new Tween(clip,"_x",tweenType,clip._x,newx,3,true);
		var yTween:Tween =  new Tween(clip,"_y",tweenType,clip._y,newy,3,true);
	}
}

Copyright © 2008 Otuome Labs. All rights reserved.

sfy39587f11