Forked from: yd_niku's flash on 2009-10-1 diff:1 forked from: flash on 2009-10-1 Ogoshi forked:0favorite:0lines:32license : MIT License modified : 2009-10-01 19:50:56 Embed Tweet // forked from yd_niku's flash on 2009-10-1 package { import flash.display.Sprite; import frocessing.display.*; public class FlashTest extends F5MovieClip2DBmp{ private var stage_width:Number = 465; private var stage_height:Number = 465; private var n:int =30; private var t:Number = 0; public function FlashTest() { } public function setup():void { background( 0xcccccc ); noFill(); colorMode( HSV, 10, 1, 1 ); } public function draw():void { stroke( t, 1, 1, 1 ); //circle( mouseX,mouseY, noise( 10, 100 ) ); //ellipse( mouseX, mouseY, width,height) //point(mouseX, mouseY); translate( 0, stage_height / 2 ); scale( 1, Math.cos(t) ); beginShape(); curveVertex( -100, 0 ); for ( var i:int=0; i <= n; i++ ){ var xx:Number = i * stage_width / n; var yy:Number = noise( i * 10, t ) * 300 - 150; curveVertex( xx, yy ); } curveVertex( stage_width+100, 0 ); endShape(); t+=0.01; } } } Code Fullscreen Preview Fullscreen