0
我試圖讓閃光燈從舞臺中央畫出一條線,並在舞臺周圍增加。不知道我會用什麼數學來做到這一點。到目前爲止,我的觀點已經到了一定程度,但不知道如何改變這一點,以便圍繞我的舞臺的任何尺寸展開。AS3盤旋舞臺
到目前爲止,我有這樣的:
var linetox=0;
var linetoy=0;
var _stage=this;
var _stage_center_x = stage.stageWidth/2;
var _stage_center_y = stage.stageHeight/2;
trace(_stage_center_x);
function enterframe(e:Event):void {
linetox+=10;
linetoy+=10;
var lineDrawing:MovieClip = new MovieClip();
this.addChild(lineDrawing);
lineDrawing.graphics.lineStyle(1);
lineDrawing.graphics.moveTo(_stage_center_x,_stage_center_y);///This is where we start drawing
lineDrawing.graphics.lineTo(linetox, linetoy);
}
this.addEventListener(Event.ENTER_FRAME, enterframe);
這顯然移動線再降的目的地的結局,只是想獲得它繪製在屏幕上(如時鐘)
感謝!!!!!!!!! – kilrizzy 2010-01-31 23:31:36