notice: Flash editor updated! Join the development! Thanks to MiniBuilder


forked from : soundkitchen's sample 1 [diff(2)]

embed

FORKED
  1. // forked from soundkitchen's sample 2
  2. package
  3. {
  4.     import flash.display.Sprite;
  5.     import caurina.transitions.Tweener;
  6.     [SWF(width=465, height=465, frameRate=30, backgroundColor=0xffffff)]
  7.     public class Sample extends Sprite
  8.     {
  9.         public function Sample()
  10.         {
  11.             //  オブジェクトを作成
  12.             var ball:Sprite = new Sprite();
  13.             //  座標を指定
  14.             ball.x = 100;
  15.             ball.y = 100;
  16.             //  丸を描画
  17.             ball.graphics.beginFill(0x000000);
  18.             ball.graphics.drawCircle(0040);
  19.             ball.graphics.endFill();
  20.             //  ステージに配置
  21.             addChild(ball);
  22.             //  トゥイーンさせる
  23.             Tweener.addTween(ball, {
  24.                 x: 300,
  25.                 scaleX: 0,
  26.                 scaleY: 0,
  27.                 time: 10,
  28.                 transition: "easeInOutSine"
  29.             });
  30.         }
  31.     }
  32. }
noswf
  1. package
  2. {
  3.     import flash.display.Sprite;
  4.     import caurina.transitions.Tweener;
  5.     [SWF(width=465, height=465, frameRate=30, backgroundColor=0xffffff)]
  6.     public class Sample extends Sprite
  7.     {
  8.         public function Sample()
  9.         {
  10.             //  オブジェクトを作成
  11.             var ball:Sprite = new Sprite();
  12.             //  座標を指定
  13.             ball.x = 100;
  14.             ball.y = 100;
  15.             //  丸を描画
  16.             ball.graphics.beginFill(0x000000);
  17.             ball.graphics.drawCircle(0040);
  18.             ball.graphics.endFill();
  19.             //  ステージに配置
  20.             addChild(ball);
  21.             //  トゥイーンさせる
  22.             Tweener.addTween(ball, {
  23.                 x: 300,
  24.                 scaleX: 0,
  25.                 scaleY: 0,
  26.                 time: 2,
  27.                 transition: "easeInOutSine",
  28.                 onComplete: tweenCompleteHandler,
  29.                 onCompleteParams: [ball]
  30.             });
  31.         }
  32.         private function tweenCompleteHandler(ball:Sprite):void
  33.         {
  34.             //  2 回目のトゥイーン
  35.             Tweener.addTween(ball, {
  36.                 y: 300,
  37.                 scaleX: 2,
  38.                 scaleY: 2,
  39.                 time: 1,
  40.                 transition: "easeInExpo"
  41.             });
  42.         }
  43.     }
  44. }
noswf
Get Adobe Flash Player