var g:Number = 600; var f:Number = 600; var t:Number = 0.02; var radius:Number = 20; var xStart:Number = 100; var yStart:Number = 100; var nc:Number = 50; for (i=1; i (this.restl-1)){ _root["n"+this.p1]["sForceX"+this.nm] = 0; _root["n"+this.p1]["sForceY"+this.nm] = 0; _root["n"+this.p2]["sForceX"+this.nm]= 0; _root["n"+this.p2]["sForceY"+this.nm] = 0; }else{ if(this.dist < this.restl){ this.error = this.restl - this.dist; _root["n"+this.p1]["sForceX"+this.nm] = (Math.cos(this.angle)*f*this.error)/2; _root["n"+this.p1]["sForceY"+this.nm] = (Math.sin(this.angle)*f*this.error)/2; _root["n"+this.p2]["sForceX"+this.nm] = (Math.cos(this.angle)*-f*this.error)/2; _root["n"+this.p2]["sForceY"+this.nm] = (Math.sin(this.angle)*-f*this.error)/2; }else{ this.error = this.dist - this.restl; _root["n"+this.p1]["sForceX"+this.nm] = (Math.cos(this.angle)*-f*this.error)/2; _root["n"+this.p1]["sForceY"+this.nm] = (Math.sin(this.angle)*-f*this.error)/2; _root["n"+this.p2]["sForceX"+this.nm] = (Math.cos(this.angle)*f*this.error)/2; _root["n"+this.p2]["sForceY"+this.nm] = (Math.sin(this.angle)*f*this.error)/2; } } } } }