Posted By

sidneydekoning on 05/14/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

trevorhartman


Draw an Pixel arrow


 / Published in: ActionScript 3
 

  1. // Draw left and right arrows
  2. // Pass through the graphics layer of an Sprite
  3.  
  4. public static function drawLeft(pGraphics : Graphics) : void {
  5.  
  6. pGraphics.moveTo(0, 0);
  7. pGraphics.drawRect(0, 0,5,1);
  8. pGraphics.drawRect(1, -1,1,1);
  9. pGraphics.drawRect(2, -2,1,1);
  10. pGraphics.drawRect(1, 1,1,1);
  11. pGraphics.drawRect(2, 2,1,1);
  12. }
  13.  
  14. public static function drawRight(pGraphics : Graphics) : void {
  15.  
  16. pGraphics.moveTo(0, 0);
  17. pGraphics.drawRect(0, 0,5,1);
  18. pGraphics.drawRect(4, -1,1,1);
  19. pGraphics.drawRect(3, -2,1,1);
  20. pGraphics.drawRect(4, 1,1,1);
  21. pGraphics.drawRect(3, 2,1,1);
  22. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: tian4tian on December 25, 2009

????why

Posted By: sidneydekoning on June 16, 2010

because its handy :)

You need to login to post a comment.