Return to Snippet

Revision: 13952
at May 15, 2009 09:57 by sidneydekoning


Updated Code
package
{
	import flash.display.Sprite;	
	/**
	 * @author sidneydekoning
	 */
	public class CheckBoxIcon extends Sprite {

		public function CheckBoxIcon(  ) {
			uncheck( );
		}

		
		public function check(  ):void {
			
			graphics.clear( );
			graphics.lineStyle( 1 );
			graphics.beginFill( 0xFFFFFF );
			graphics.drawRect( 0 , 0 , 15 , 15 );
			graphics.endFill( );
			graphics.lineTo( 15 , 15 );
			graphics.moveTo( 0 , 15 );
			graphics.lineTo( 15 , 0 );
		}

		
		public function uncheck(  ):void {
			
			graphics.clear( );
			graphics.lineStyle( 1 );
			graphics.beginFill( 0xFFFFFF );
			graphics.drawRect( 0 , 0 , 15 , 15 );
		}
	}
}

Revision: 13951
at May 14, 2009 09:23 by sidneydekoning


Initial Code
class CheckBoxIcon extends flash.display.Sprite {

    public function CheckBoxIcon (  ) {
      uncheck(  );
    }

    public function check (  ):void {
      graphics.clear(  );
      graphics.lineStyle(1);
      graphics.beginFill(0xFFFFFF);
      graphics.drawRect(0, 0, 15, 15);
      graphics.endFill(  );
      graphics.lineTo(15, 15);
      graphics.moveTo(0, 15);
      graphics.lineTo(15, 0);
    }

    public function uncheck (  ):void {
      graphics.clear(  );
      graphics.lineStyle(1);
      graphics.beginFill(0xFFFFFF);
      graphics.drawRect(0, 0, 15, 15);
    }
  }
}

Initial URL

                                

Initial Description

                                

Initial Title
Creating a CheckboxIcon Class

Initial Tags

                                

Initial Language
ActionScript 3