AS3. Sliding Text (work with Animation Lib Demo)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
package {
import flash.text.*;
public class SlidingText extends TextField {
private var animator:Animator;
public function SlidingText (toX:Number, toY:Number, duration:Number) {
animator = new Animator(this);
slideTo(toX, toY, duration);
}
public function slideTo (toX:Number, toY:Number, duration:Number):void {
animator.animateTo(toX, toY, duration);
}
}
}