In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: forked from: flash on 2009-10-19

Get Adobe Flash player
by yabuchany 19 Oct 2009
    Embed
/**
 * Copyright yabuchany ( http://wonderfl.net/user/yabuchany )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/sIaX
 */

// forked from yabuchany's forked from: flash on 2009-10-19
// forked from yabuchany's flash on 2009-10-19
package {
	import frocessing.display.*;
	public class Main extends F5MovieClip2DBmp{
		
		public function Main() {
			super();
		}
		
		public function setup():void {
			noStroke();
			smooth();
			fill(0);
			var offset:Number = 50; // Y offset
			var scaleVal = 20    // Scale value for the wave magnitude
			var angleInc = PI/18.0; // Increment between the next angle
			var angle:Number = 0;
			for(var x:int = 0;x<=width;x+=5){
				var y:int = offset+(sin(angle)*scaleVal);
				fill(255);
				rect(x,y,2,4);
				y = offset+(cos(angle)*scaleVal);
				fill(0);
				rect(x,y,2,4);
				angle += angleInc			}
		}
	}
}