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: ぽこぽこ!RainbowColorの七宝模様

希望に答えて(?)
*
* @see http://tirirenge.undo.jp/?p=1766
// forked from paq's ぽこぽこ!RainbowColorの七宝模様
// forked from ahchang's forked from: RainbowColorの七宝模様
// forked from ahchang's RainbowColorの七宝模様
// forked from ahchang's flash on 2009-5-1 RandomColorなCircleを並べてみた
/*
 * 希望に答えて(?)
 *
 * @see http://tirirenge.undo.jp/?p=1766
*/
package {
    import flash.display.Sprite;
    
    [SWF(width=465, height=465, frameRate=30, backgroundColor=0x000000)]
    
    public class CircleNest extends Sprite
    {   
        private var cx:int;
        private var cy:int;
        private var r:int=30;
             
        public function CircleNest()
        {
            init();            
        }
        
        private function init():void
        {
            for (var i:uint=0; i<12; i++)
            {
                cx = i*r*1.42;
                
                for (var j:uint=0; j<12; j++)
                {
                    cy = j*r*1.42;
                    var circle:Sprite = new Tama(cx,cy,r);
                    addChild(circle);
                }
            }
        }
    }
}

import flash.display.Sprite;
import frocessing.color.ColorHSV;
import flash.display.BlendMode;
import caurina.transitions.Tweener;
import flash.events.Event;
import flash.events.MouseEvent;

class Tama extends Sprite
{
     private var hsv:ColorHSV;
     
     public function Tama(x:int,y:int,r:uint = 30 )
     {
         hsv = new ColorHSV(0, 1, 1, 1);
         hsv.h = x+y;
         
         this.graphics.beginFill(hsv.value);
         this.graphics.drawCircle(0, 0, r);
         this.graphics.endFill();
         this.alpha = 0.4;
         this.scaleX = 0;
         this.scaleY = 0;
         this.x = x;
         this.y = y;
         Tweener.addTween(this, {scaleY:1, scaleX:1, time:1, delay:(x+y+x+x)/500,transition:"easeOutBounce"});
         this.addEventListener(MouseEvent.ROLL_OVER, rollOver);
         this.addEventListener(MouseEvent.ROLL_OUT, rollOut);
         this.blendMode = BlendMode.ADD;
     }
     
     private function rollOver(e:MouseEvent):void
     {
         Tweener.addTween(this, {scaleX:2, scaleY:2, time:0.3, transition:"easeOutBack"});
     }
     
     private function rollOut(e:MouseEvent):void
     {
         Tweener.addTween(this, {scaleX:1, scaleY:1, time:0.8, transition:"easeOutBounce"});
     }
}