Title Image

一月 2013

ActionScript3自动画线_笔记

  |   Geek   |   No comment

随路径自动画线, 逐帧侦听函数: addEventListener(Event.ENTER_FRAME,addfrog); 画线: graphics.lineStyle(宽度,颜色); graphics.moveTo(起点坐标); graphics.lineTo(终点坐标); 如需删除所生成的线条,使用    graphics.clear(); 舞台需要"box"影片剪辑..用来做路径动画. 库需要"RR_shape1"的影片剪辑.用来逐帧打点. var myMC:Sprite; var Ary:Array = new Array ; var myMC1:Sprite; addEventListener(Event.ENTER_FRAME,addfrog); function addfrog(e:Event):void { var r1=new RR_shape1(); addChild(r1); r1.x = box.x; r1.y = box.y; myMC = r1; Ary.push(myMC); ...

Read More