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

odekochan

Get Adobe Flash player
by miyaoka 25 Dec 2008
/**
 * Copyright miyaoka ( http://wonderfl.net/user/miyaoka )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/8WYG
 */

package 
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	import caurina.transitions.Tweener;
	
	[SWF(width="465", height="465", backgroundColor= 0xffffff, frameRate="60")]
	public class Odeko
	extends Sprite
	{
		public function Odeko():void 
		{
			var face:Sprite = new Sprite();
			addChild(face);
			
			//kao
			face.graphics.beginFill(0xffddcc);
			face.graphics.drawCircle(stage.stageWidth/2, stage.stageHeight/2, stage.stageWidth / 2);
			face.graphics.endFill();
			face.graphics.beginFill(0xffddcc);
			face.graphics.drawRect(0, stage.stageHeight / 2, stage.stageWidth, stage.stageHeight);
			
			//me
			face.graphics.beginFill(0x222222);
			face.graphics.drawCircle(stage.stageWidth * 0.2, stage.stageHeight * 0.8, 20);
			face.graphics.drawCircle(stage.stageWidth * 0.8, stage.stageHeight * 0.8, 20);
			face.graphics.beginFill(0xffffff);
			face.graphics.drawCircle(stage.stageWidth * 0.2, stage.stageHeight * 0.8 - 10, 5);
			face.graphics.drawCircle(stage.stageWidth * 0.8, stage.stageHeight * 0.8 - 10, 5);
			face.graphics.endFill();
			
			//kuti
			face.graphics.lineStyle(5, 0x990000);
			face.graphics.moveTo(stage.stageWidth * 0.4, stage.stageHeight+10);
			face.graphics.curveTo(stage.stageWidth * 0.5, stage.stageHeight + 50, stage.stageWidth * 0.6, stage.stageHeight+10);
			
			
			//kami
			var h:Hair = new Hair();
			face.addChild(h);
			h.x = stage.stageWidth / 2;
			h.y = 0;
			h.width = stage.stageWidth*1.2*1.2;
			h.height = stage.stageHeight * 1.0*1.2;
			stage.addEventListener(MouseEvent.MOUSE_MOVE, function ():void { h.update(); });
			stage.addEventListener(MouseEvent.MOUSE_DOWN, function ():void { pyokon(face); });
			
			pyokon(face);
		}
		private function pyokon(face:Sprite):void 
		{
			face.y = stage.stageHeight * 0.6;
			Tweener.addTween(face, {
				y : 0,
				time: 1.0,
				transition: "easeOutBack"
			});
			
		}
	}	
}

import flash.display.Sprite;
import flash.display.LineScaleMode;
import flash.display.CapsStyle;
class Hair
extends Sprite
{
	public function Hair():void 
	{
		update();
	}
	public function update():void 
	{
		graphics.clear();
		graphics.lineStyle(8, 0x332222, 0.95, false, LineScaleMode.NORMAL, CapsStyle.ROUND);
		var i:int;
		for (i = 0; i < 10; i++)
		{
			graphics.moveTo(0, 0); 
			graphics.curveTo(100 + i * 10, 0, 100 + i * 10 * 0.6, 300 - i*5);
		}
		for (i = 0; i < 10; i++)
		{
			graphics.moveTo(0, 0); 
			graphics.curveTo(-100 - i * 10, 0, -100 - i * 10 * 0.6, 300 - i*5);
		}
		graphics.lineStyle(5, 0x332222, 0.8, false, LineScaleMode.NORMAL, CapsStyle.ROUND);
		for (i = -30; i < 31; i++)
		{
			graphics.moveTo(0, 0);
			var hx:Number = i*3;
			if (mouseY < 150 && ((0 < mouseX && 0 < i && hx < mouseX) || (0 > mouseX &&  0 > i && hx > mouseX)))
			{
				graphics.curveTo(hx, 0, mouseX, mouseY);
				graphics.lineTo(mouseX, 170);
			}
			else
			{
				graphics.curveTo(hx, 0, hx, 170);
			}
		}
	}
}