TweenerのonStartプロパティ
/**
* Copyright undo ( http://wonderfl.net/user/undo )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/lJBt
*/
package {
import flash.display.Sprite;
import flash.text.TextField;
import caurina.transitions.Tweener;
public class FlashTest extends Sprite {
private var s:Sprite;
private var tf:TextField;
public function FlashTest() {
// write as3 code here..
s = new Sprite();
addChild(s);
s.graphics.beginFill(0xff0000);
s.graphics.drawRect(-10,-10,20,20);
s.graphics.endFill();
tf = new TextField();
addChild(tf);
tf.x = stage.stageWidth/2;
tf.y = stage.stageHeight/2;
Tweener.addTween(s, {x:stage.stageWidth,
y:stage.stageHeight,
time:5,
delay:3,
onStart:onTweenStart,
onComplete:onTweenComplete,
transition:"easeInOutCubic"});
tf.text = "Tweener.addTween!"
}
private function onTweenStart():void
{
tf.text = "Tween Start!";
}
private function onTweenComplete():void
{
tf.text = "Tween Complete!";
}
}
}