Creating a CheckboxIcon Class


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. package
  2. {
  3. import flash.display.Sprite;
  4. /**
  5. * @author sidneydekoning
  6. */
  7. public class CheckBoxIcon extends Sprite {
  8.  
  9. public function CheckBoxIcon( ) {
  10. uncheck( );
  11. }
  12.  
  13.  
  14. public function check( ):void {
  15.  
  16. graphics.clear( );
  17. graphics.lineStyle( 1 );
  18. graphics.beginFill( 0xFFFFFF );
  19. graphics.drawRect( 0 , 0 , 15 , 15 );
  20. graphics.endFill( );
  21. graphics.lineTo( 15 , 15 );
  22. graphics.moveTo( 0 , 15 );
  23. graphics.lineTo( 15 , 0 );
  24. }
  25.  
  26.  
  27. public function uncheck( ):void {
  28.  
  29. graphics.clear( );
  30. graphics.lineStyle( 1 );
  31. graphics.beginFill( 0xFFFFFF );
  32. graphics.drawRect( 0 , 0 , 15 , 15 );
  33. }
  34. }
  35. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.