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-4-13

Get Adobe Flash player
by kihon 13 Apr 2010
    Embed
/**
 * Copyright kihon ( http://wonderfl.net/user/kihon )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/xxX9
 */

package
{
	import flash.display.Sprite;
 
	public class Main extends Sprite
	{
		private var colors:Array = [0xED1A3D, 0x008000, 0x009AD6, 0xF8ABA6, 0xFF9900, 0xA757A8];
 
		public function Main()
		{
			graphics.beginFill(0x1D2328);
			graphics.drawRect(0, 0, 465, 465);
			graphics.endFill();
 
			for (var i:int = 0; i < colors.length; i++)
			{
				var pencil:Pencil = new Pencil(colors[i]);
				pencil.x = i * 40;
				addChild(pencil);
			}
		}
	}
}
 
import flash.display.Sprite;
import frocessing.color.ColorHSV;
 
class Pencil extends Sprite
{
	public function Pencil(color:int)
	{
		var colorB:ColorHSV = new ColorHSV();
		colorB.value = color;
		colorB.v -= 0.25;
 
		graphics.beginFill(color);
		graphics.moveTo(20, 0);
		graphics.lineTo(14, 15);
		graphics.lineTo(26, 15);
		graphics.endFill();
 
		graphics.beginFill(0xE2CD8C);
		graphics.moveTo(14, 15);
		graphics.lineTo(5, 40);
		graphics.lineTo(11, 44);
		graphics.lineTo(29, 44);
		graphics.lineTo(35, 40);
		graphics.lineTo(26, 15);
		graphics.endFill();
 
		graphics.beginFill(colorB.value);
		graphics.moveTo(5, 40);
		graphics.lineTo(5, 200);
		graphics.lineTo(11, 204);
		graphics.lineTo(11, 44);
		graphics.endFill();
 
		graphics.beginFill(colorB.value);
		graphics.moveTo(29, 44);
		graphics.lineTo(29, 204);
		graphics.lineTo(35, 200);
		graphics.lineTo(35, 40);
		graphics.endFill();
 
		graphics.beginFill(color);
		graphics.moveTo(11, 44);
		graphics.lineTo(11, 204);
		graphics.lineTo(29, 204);
		graphics.lineTo(29, 44);
		graphics.endFill();
	}
}