Project 0
GDE Error: Unable to load profile settings
<pre lang="ACTIONSCRIPT">
package {
import flash.display.Graphics;
import flash.display.MovieClip;
public class Sine1 extends MovieClip {
public var m:MovieClip;
public function Sine1():void {
m = new MovieClip();
m.graphics.lineStyle(0, 0x000000);
addChild(m);
for (var i:Number = 0; i < 90; i++) {
drawSine(3, 38 + 5.75 * i, -27, .02, 0.00064);
}
}
public function drawSine(sinX:Number, sinY:Number,
ampl:Number, step:Number, p:Number):void {
m.graphics.moveTo(sinX, sinY);
for (var i:Number = 0, j:Number = 9.3; i < 600; i += step, j += p) {
m.graphics.lineTo(sinX + i, sinY + ampl * Math.sin(i/j));
}
}
}
}
</pre>
Comments Off on Project 0