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

flash on 2010-3-3

Frocessingテスト
@author ish-xxxx
Get Adobe Flash player
by ish_xxxx 03 Mar 2010
    Embed
/**
 * Copyright ish_xxxx ( http://wonderfl.net/user/ish_xxxx )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/A0dS
 */

package 
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.geom.Point;
	import frocessing.display.F5MovieClip2D;
	
	/**
	 * Frocessingテスト
	 * @author ish-xxxx
	 */
	[SWF(frameRate="60",backgroundColor="#121212")]
	public class Index extends F5MovieClip2D
	{
		////////////////////////////////////
		// Variables
		////////////////////////////////////
		protected var count:Number = 0;
		protected var points:Vector.<Point> = new Vector.<Point>;
		
		//Constructor
		public function Index() 
		{
			super();
		}
		
		//セットアップ
		public function setup(): void
		{
			colorMode( HSV, 100 );
			noSmooth();
			noFill();
		}
		
		//描画
		public function draw(): void
		{
			stroke( count, 100, 100, 100 );
			points.push( new Point( mouseX, mouseY ) );
			var l:int = points.length;
			beginShape();
				for ( var i:uint = 0; i < l; i++ ) {
					circle( points[i].x, points[i].y, Math.random()*100 );
				}
				for ( i = 0; i < l; i++ ) {
					curveVertex( points[i].x, points[i].y );
				}
				endShape();
			if ( points.length > 30 ) {
				points.shift();
			}
			count += 0.25;
		}
		
	}

}