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

flash on 2009-9-25

Get Adobe Flash player
by soundkitchen 24 Sep 2009
    Embed
/**
 * Copyright soundkitchen ( http://wonderfl.net/user/soundkitchen )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ihow
 */

package
{
    import flash.display.Sprite;
    import caurina.transitions.Tweener;
    import caurina.transitions.properties.FilterShortcuts;

    [SWF(width=465, height=465, frameRate=30, backgroundColor=0xFFFFFF)]

    public class Sample extends Sprite
    {
        public function Sample()
        {
            FilterShortcuts.init();

            //  オブジェクトを作成
            var ball:Sprite = new Sprite();

            //  座標を指定
            ball.x = 100;
            ball.y = 100;

            //  丸を描画
            ball.graphics.beginFill(0x000000);
            ball.graphics.drawCircle(0, 0, 40);
            ball.graphics.endFill();

            //  ステージに配置
            addChild(ball);

            //  ボール浮く
            Tweener.addTween(ball, {
                _DropShadow_color: 0x000000,
                _DropShadow_alpha: .6,
                _DropShadow_angle: 135,
                _DropShadow_distance: 30,
                _DropShadow_blurX: 32,
                _DropShadow_blurY: 32,
                time: 2,
                transition: "easeInOutCubic",
                onComplete: move,
                onCompleteParams: [ball]
            });
        }

        private function move(ball:Sprite):void
        {
            //  ボール動く
            Tweener.addTween(ball, {
                x: 300,
                _DropShadow_angle: 45,
                time: 2,
                transition: "easeInOutExpo",
                onComplete: land,
                onCompleteParams: [ball]
            });
        }

        private function land(ball:Sprite):void
        {
            //  ボール着く
            Tweener.addTween(ball, {
                _DropShadow_distance: 0,
                _DropShadow_blurX: 0,
                _DropShadow_blurY: 0,
                time: 2,
                transition: "easeInOutCubic"
            });
        }
    }
}