Drawing heartrate app is killing my CPU

When i run this swf for a while, the CPU reaches 100% and my computer get locked. I guess it has to do with enterFrame, but are not sure. Any ideas or code are highly appreciated.

code on MC:
onClipEvent (enterFrame) {
this._x = this._x-0.5;
}

code inside MC:
_root.createEmptyMovieClip(“triangle”, 1);
z = Math.sin(x)/Math.tan(y);
x = x+3;
y = random(2);
s = s+1;
lineStyle(2, 0xCA1E38,100);
lineTo(x,(z*70));