LOVE CHECKBOX forked from: LOVE MINIMALCOMPS

by alterna_in forked from LOVE MINIMALCOMPS (diff: 30)
@author Toshiki Izumi a.k.a. alternadotin
♥0 | Line 30 | Modified 2010-04-02 03:05:11 | 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/oRDu
 */

package  
{
	import com.bit101.components.CheckBox;

	import flash.display.Sprite;


	/**
	 * @author Toshiki Izumi a.k.a. alternadotin
	 */
	[SWF(backgroundColor="#FFFFFF", frameRate="30", width="465", height="465")]
	public class LoveCheckBox extends Sprite
	{
		private	var bx : Number = 0;
		private var by : Number = 0;
		private const SIZE : Number = 15;

		public function LoveCheckBox ()
		{
			for (var i : int = 0;i < 1000;i++) {
				var check : CheckBox = new CheckBox();
				check.width = SIZE;
				check.height = SIZE;
				check.x = bx;
				check.y = by;
				check.selected=true;
				
				if(Math.floor(Math.random() * 50) == 1)check.selected = false;
				
				bx += SIZE;			
				if(bx > stage.stageWidth) {
					bx = 0;
					by += SIZE;
				}
				addChild(check);					
			}
		}
	}
}