小球旋转

如果想使一个小球不停的旋转,可以使用以下方法

package {
  import flash.display.MovieClip;
  import flash.events.Event;

  public class chen extends MovieClip{

    public function chen() {

      mc.x=stage.stageWidth/2;
      mc.y=stage.stageHeight/2;
      addEventListener(Event.ENTER_FRAME,aa);
    }

    public function aa(e:Event):void {
      mc.rotationX+=1;
      mc.rotationY+=1;
      mc.rotation+=10;

    }

  }

}

 


 

 

posted @ 2010-11-04 16:41  sinsoul  阅读(316)  评论(0编辑  收藏  举报