Posted By

luismessias on 02/12/11


Tagged


Versions (?)

Risco no Label


 / Published in: ActionScript 3
 

  1. private var strike:Boolean = false;
  2. private var color:int = 0x7BBF77;
  3.  
  4. override protected function updateDisplayList(
  5. unscaledWidth:Number, unscaledHeight:Number):void
  6. {
  7. super.updateDisplayList( unscaledWidth, unscaledHeight );
  8.  
  9. if( strike == true )
  10. {
  11. var height:int = unscaledHeight / 2;
  12. var width:int = unscaledWidth;
  13.  
  14. graphics.lineStyle( 1, color );
  15. graphics.beginFill ( color );
  16. graphics.moveTo( 0, height );
  17. graphics.lineTo( width, height );
  18. graphics.endFill();
  19. }
  20. else
  21. graphics.clear ();
  22. }

Report this snippet  

You need to login to post a comment.