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 chabudai's ざわ・・・
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.TimerEvent
    import flash.utils.Timer;
	
    import caurina.transitions.Tweener;
    import caurina.transitions.properties.ColorShortcuts;
    ColorShortcuts.init();
    
    [SWF(width="465", height="465", backgroundColor="0x000000", frameRate="30")]
       
    public class ZawaZawa extends Sprite {
		
	public function ZawaZawa() {
		var zawaTimer:Timer = new Timer(200);
		zawaTimer.addEventListener(TimerEvent.TIMER, addZawa);
		zawaTimer.start();
	}
	
	private function addZawa(e:TimerEvent):void {
		//少しだけランダムに
		var random:uint = Math.random() * 3;
		
		if (random != 1) {
			var zawa:Zawa = new Zawa(0x666666);
			zawa.x = Math.random() * stage.stageWidth;
			zawa.y = Math.random() * stage.stageHeight
			var scale:uint = Math.random() * 5;
			zawa.scaleX = zawa.scaleY = scale / 10 + 0.6;
			
			addChild(zawa);
			Tweener.addTween(zawa, { _tintBrightness:-1, time:2, transition:"easeInSine", delay: 0, onComplete:removeZawa, onCompleteParams:[zawa] } );
			zawa.addEventListener(Event.ENTER_FRAME, scaleOut);
		}
	}
	
	private function removeZawa(mc:Sprite):void {
		mc.removeEventListener(Event.ENTER_FRAME, scaleOut);
		removeChild(mc);
	}
	
	private function scaleOut(e:Event):void {
		e.target.scaleX -= 0.003;
		e.target.scaleY -= 0.003;
	}
	
    }
}	

import flash.display.Sprite;
class Zawa extends Sprite {
	
	private var color:uint;
	private var thickness:uint;
	
	public function Zawa(c:uint=0x000000) {
		draw(c);
	}
	
	private function draw(c:uint=0x000000):void {
		color = c;
		thickness = 7;
		
		var sp:Sprite = new Sprite();
		addChild(sp);
		
		//ざ
		sp.graphics.lineStyle(thickness, color);
		sp.graphics.moveTo(-48, -9);
		sp.graphics.lineTo( -6, -9);
		sp.graphics.moveTo( -33, -19);
		sp.graphics.lineTo( -6, 9);
		sp.graphics.lineTo( -38, 9);
		sp.graphics.curveTo( -49, 9, -49, 18);
		sp.graphics.curveTo( -49, 27, -38, 27);
		sp.graphics.lineTo( -7, 27);
		sp.graphics.moveTo( -17, -26);
		sp.graphics.lineTo( -17, -18);
		sp.graphics.moveTo( -7, -26);
		sp.graphics.lineTo( -7, -18);
		
		//わ
		sp.graphics.moveTo(15, -16);
		sp.graphics.lineTo(15, 27);
		sp.graphics.moveTo(5, -10);
		sp.graphics.lineTo(27, -10);
		sp.graphics.lineTo(6, 26);
		sp.graphics.moveTo(18, 5);
		sp.graphics.curveTo(28, -6, 42, 0);
		sp.graphics.curveTo(50, 5, 49, 14);
		sp.graphics.curveTo(48, 23, 36, 27);
		
		//・・・
		sp.graphics.lineStyle();
		sp.graphics.moveTo(62, 10);
		sp.graphics.beginFill(color);
		
		sp.graphics.drawCircle(64, 11, 4.5);
		sp.graphics.drawCircle(79, 11, 4.5);
		sp.graphics.drawCircle(94, 11, 4.5);
		sp.graphics.endFill();
	}
}