Posted By

sidneydekoning on 05/14/09


Tagged

Drawing cross utils


Versions (?)

Draw a Cross


 / Published in: ActionScript 3
 

  1. var mysprite:Sprite = new Sprite();
  2.  
  3. createCross(mysprite);
  4.  
  5. function createCross( s:Sprite ):void {
  6. var mark:Sprite = new Sprite( );
  7. mark.graphics.lineStyle( 1 , 0xffffff );
  8. mark.graphics.moveTo( -5 , -5 );
  9. mark.graphics.lineTo( 5 , 5 );
  10. mark.graphics.moveTo( -5 , 5 );
  11. mark.graphics.lineTo( 5 , -5 );
  12. s.parent.addChild( mark );
  13. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: sidneydekoning on May 15, 2009

it should actually read, draw across in the centerpointof the parent clip.

You need to login to post a comment.