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: しかく

"SKETCHNAME"
* by ish-xxxx
Get Adobe Flash player
by ish_xxxx 02 Jan 2009
// forked from ish_xxxx's forked from: しかく
// forked from ish_xxxx's しかく
// forked from ish_xxxx's forked from: forked from: まる2
// forked from ish_xxxx's forked from: まる2
// forked from ish_xxxx's まる2
/**
 * "SKETCHNAME"
 * by ish-xxxx
 */
package  {
	
	import flash.display.*;
	import flash.net.*;
	import flash.text.*;
	import flash.events.*;
	import flash.geom.*;
	
	/**
	 * ...
	 * @author ish-xxxx
	 */
	public class App extends Sprite {
		
		//SWF SETTING CONSTANTS//////////////////
		private const BGCOLOR:uint = 0x0;
		private const FRAMERATE:uint = 45;
		private const WIDTH:uint = 465;
		private const HEIGHT:uint = 465;
		///////////////////////////////////////////
		
		//SWF SETTING VARS/////////////////////////
		private var CANVAS:Graphics;
		///////////////////////////////////////////
		
		//CONSTANTS//////////////////////////////
		
		///////////////////////////////////////////
		
		//VARS////////////////////////////////////
		
		///////////////////////////////////////////
		
		public function App() {
			
			//CANVAS Setting////////////////////
			stage.frameRate = FRAMERATE;
			CANVAS = graphics;
			CANVAS.beginFill( BGCOLOR , 1.0 );
			CANVAS.drawRect( 0 , 0 , WIDTH , HEIGHT );
			CANVAS.endFill();
			////////////////////////////////////
			
			init();
			
		}
		
		private function init() : void {
			
			var ty:Number = 0;
			var count:int = 0;
			while ( ty <= HEIGHT + Circle.w) {
				var tx:Number = Circle.w * count;
				if ( tx > WIDTH + Circle.w ) {
					tx = 0;
					ty += Circle.w;
					count = 0;
				}
				var c:Circle = new Circle();
				c.x = tx;
				c.y = ty;
				addChild( c );
				c.run();
				count++;
			}
			
			setup();
			
		}
		
		private  function setup() : void {
			
			//
			
		}
		
	}
	
}

///////////////////////////////////////////////
//Optional Classes
///////////////////////////////////////////////
import flash.display.*;
import flash.net.*;
import flash.text.*;
import flash.events.*;
import flash.geom.*;
import caurina.transitions.Tweener;
import caurina.transitions.properties.*;

class Circle extends Shape {
	
	private var canvas:Graphics;
	private var _alpha:uint = 100;
	public static var w:uint = 40;
	private var time : uint = 0;
	private var dt:uint = 100;
        private var r:uint;
        private var round:uint = 20;
	public function Circle() : void {
		init();
	}
	
	private function init() : void {
		blendMode = BlendMode.INVERT;
		canvas = graphics;
		DisplayShortcuts.init();
                r = Utils.getRandom(3);
		setup();
	}
	
	private function setup() : void {
		setDraw();
                addEventListener( "enterFrame" , _render );
	}

        private function _render( ev:Event ) : void {

        }
	
	public function run() : void {
		
		scaleX == 0 ? Tweener.addTween( this , { _scale : 1 , time : 0.5 , delay : r, transition : "easeOutExpo" , onComplete : run } )  : Tweener.addTween( this , { _scale : 0 , time : 0.5 , delay : r , transition : "easeOutBack" , onComplete : changeColor } ); ;
	}
	
	public function changeColor() : void {
		setDraw();
		run();
	}

        protected function setDraw() : void {

                canvas.clear();
		canvas.beginFill( Utils.getColor() , _alpha / 100 );
		canvas.drawRoundRect( -w , -w , w * 2 , w * 2 , round , round );

        }
	
}

class Utils {  
       
    public function Utils() {  
        //Can't Create Instance  
    }  
      
    public static function getColor() : uint {  
        return Math.random() * 0xFFFFFF | 0;    
    }  
      
    public static function getRandom( threshold:Number ) : Number {  
        var res:Number;  
        res = Math.random() * threshold;  
        return res | 0;
    }         
	
}