MORNING!
Let’s say that I have a line being dynamically generated by an enter frame function (see script below). As long as the movie is playing, the line’s width is increasing.
-
At what point (if ever) does its always-incresing width have a negative effect on the processor?
-
Is there any way to test the processor in such a situation to make sure that things aren’t undermining performance?
Thanks in advance to anyone who takes the time to read this.
var mc:MovieClip = new MovieClip();
mc.graphics.lineStyle(2, 0x000000, 1);
mc.graphics.moveTo(0, 0);
addChild(mc);
var newX:Number = 0;
var newY:Number= 0;
var xspeed:Number = 5;
var yspeed:Number = 5;
addEventListener(Event.ENTER_FRAME, go);
function go(e:Event)
{
newX += xspeed;
newY += yspeed;
mc.graphics.lineTo(newX, newY);
if(newY > stage.stageHeight || newY < 0)
{
yspeed *=-1;
}
if(mc.width>stage.stageWidth)
{
mc.x -=xspeed;
}
}