init(s)


    private function init():void {
     ball = new animation_ch03_Ball();
     addChild(ball);
     ball.x = stage.stageWidth / 2;
     ball.y = stage.stageHeight / 2;
     addEventListener(Event.ENTER_FRAME, onEnterFrame);
    }
  

frame(s)


    public function onEnterFrame(event:Event):void {
     ball.scaleX = ball.scaleY = centerScale + Math.sin(angle) * range;
     angle += speed;
    }
   }
  }