LOVE MINIMALCOMPS

by alterna_in
@author Toshiki Izumi a.k.a. alternadotin
♥0 | Line 33 | Modified 2010-04-02 02:53:21 | MIT License
play

ActionScript3 source code

/**
 * Copyright alterna_in ( http://wonderfl.net/user/alterna_in )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/k2uk
 */

package  
{
	import flash.display.Sprite;
	import com.bit101.components.PushButton;

	/**
	 * @author Toshiki Izumi a.k.a. alternadotin
	 */
	 
	[SWF(backgroundColor="#FFFFFF", frameRate="30", width="465", height="465")]
	public class LoveMinimalComps extends Sprite 
	{
		private	var bx : uint = 0;
		private var by : uint = 0;
		private var j : uint = 0;
		private const SIZE : uint = 15;
		private const LABEL : Array = ["L","O","V","E","M","I","N","I","M","A","L","C","O","M","P","S",""];
		
		public function LoveMinimalComps ()
		{
			for (var i : int = 0;i < 1000;i++) {
				var btn : PushButton = new PushButton();
				btn.width = SIZE;
				btn.height = SIZE;
				
				btn.x = Math.floor(bx);
				btn.y = Math.floor(by);
				
				btn.label = LABEL[j];
				j++;
				if(j==LABEL.length)j=0;
				
				bx += SIZE;
				
				if(bx > stage.stageWidth - SIZE) {
					bx = 0;
					by += SIZE;
				}
				
				addChild(btn);					
			}
		}
	}
}

Forked