I am trying to have flash draw a line from the center of the stage out and increment around the stage. Not sure what math I would use to do this though. So far I have the line going out to a certain point but not sure how to change that point so that it circles around whatever the dimensions of my stage would be.
So far I have this:
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);
which obviously moves the destination ending of the line lower and lower, just trying to get it to draw around the screen (like a clock)