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

Get Adobe Flash player
by awef 15 Mar 2009
    Embed
/**
 * Copyright awef ( http://wonderfl.net/user/awef )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6PUp
 */

package
{
    import flash.display.Sprite;
    import caurina.transitions.Tweener;
    [SWF(backgroundColor="#000000")]
    
    public class main extends Sprite
    {
        private var tmp:Sprite;
        function main()
        {
            tmp = new Sprite();
            
            tmp.y = stage.stageHeight / 2;
            
            tmp.graphics.beginFill(0xFFFFFF);
            tmp.graphics.drawCircle(0, 0, 32);
            tmp.graphics.endFill();
            
            stage.addChild(tmp);
            
            testa();
        }
        
        private function testa():void
        {
            Tweener.addTween(tmp, {x:100, time:2, transition:"easeOutQuart", onComplete:testb});
        }
        private function testb():void
        {
            Tweener.addTween(tmp, {scaleX:1, scaleY:1, time:2, transition:"easeOutQuart", onComplete:testc});
        }
        private function testc():void
        {
            Tweener.addTween(tmp, {x:350 , time:2, transition:"easeOutQuart", onComplete:testd});
        }
        private function testd():void
        {
            Tweener.addTween(tmp, {scaleX:0.1, scaleY:0.1, time:2, transition:"easeOutQuart", onComplete:testa});
        }
    }
}