Project 0

by xiaoyuan @ 8:22 am 13 January 2010

XSine

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>

Get Adobe Flash player

Pong

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2016 Special Topics in Interactive Art & Computational Design | powered by WordPress with Barecity