Boostworthy Animation System (as 缓动特效)

来源:互联网 发布:js截取字符串后几位 编辑:程序博客网 时间:2024/06/05 19:44

Boostworthy Animation System (as 缓动特效)

一套as3写的缓动特效.但好象里面有些类在flex里不起作用.还要再研究一下.

还是很不错的. 下面是一个 test ,里面的就是用path做的一个测试,当鼠标按下的时候,那个方块就会沿着这个圆圈转动和移动,要看清楚哦,方块在移动的时候也会转动方向的.

path类里内容比较少,然后我就在里面加了个drawCircle

/**
   * draw circle
   */
  public function drawCircle(_w:int ,_h:int):void
  {
   moveTo(_w,0);
   for (var r:Number=Math.PI *2; r>=0 ; r-=Math.PI/18 )
   {
      curveTo( _w*Math.cos (r+Math.PI /36) , _h*Math.sin (r+Math.PI /36),_w*Math.cos(r),_h*Math.sin (r));
   }
  }