In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

TweenerのonStartプロパティ

Get Adobe Flash player
by undo 21 Aug 2009
/**
 * 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!";
        }
            
    }
}