1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
class i_Effets.SuperTween extends Tween {
private static var __initEvent = EventDispatcher.initialize(SuperTween.prototype);
private var dispatchEvent:Function;
public var addEventListener:Function;
public var removeEventListener:Function;
//---Constructor
public function SuperTween (obj:Object, prop:String, func:Function, begin:Number, finish:Number, duration:Number, useSeconds:Number)
{
super(obj, prop, func, begin, finish, duration, useSeconds);
}
//---- Private méthodes
private function onMotionStarted(tw:Tween):Void {
dispatchEvent({type:"onMotionStarted", target:tw});
}
private function onMotionLooped(tw:Tween):Void {
dispatchEvent({type:"onMotionLooped", target:tw});
}
private function onMotionFinished(tw:Tween):Void {
dispatchEvent({type:"onMotionFinished", target:tw});
}
private function onMotionChanged(tw:Tween, pos:Number):Void {
dispatchEvent({type:"onMotionChanged", target:tw, position:pos});
}
private function onMotionStopped(tw:Tween):Void {
dispatchEvent({type:"onMotionStopped", target:tw});
}
private function onMotionResumed(tw:Tween):Void {
dispatchEvent({type:"onMotionResumed", target:tw});
}
} |
Partager