Jump to content
Search Community

micmac

Members
  • Posts

    1
  • Joined

  • Last visited

micmac's Achievements

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. I found the solution. create a new Fla,and paste following code in Actions Frame.And you can see the result. import flash.display.Sprite; import com.greensock.TweenMax; import com.greensock.plugins.BezierPlugin; import com.greensock.plugins.BezierThroughPlugin; var sp:Sprite=new Sprite(); addChild(sp); sp.graphics.beginFill(0xff0000); sp.graphics.drawRect(0,0,100,200); sp.graphics.endFill(); TweenMax.to(sp,5,{bezierThrough:[{x:250,y:100},{x:50,y:200},{x:500,y:200}]}); this.graphics.lineStyle(1); var xA:Array=[0,250,50,500]; var yA:Array=[0,100,200,200]; var bezierObj:Object=BezierPlugin.parseBeziers({"x":xA,"y":yA},true); var pointCount:int=0; while(pointCount { this.graphics.curveTo(bezierObj.x[pointCount][1],bezierObj.y[pointCount][1],bezierObj.x[pointCount][2],bezierObj.y[pointCount][2]); pointCount++; }
×
×
  • Create New...