Posted By

sidneydekoning on 07/16/09


Tagged

display object point x draw as3 registration DisplayObject


Versions (?)

Draw an 'x' at DisplayObject' registration point


 / Published in: ActionScript 3
 

  1. public function drawRegistrationPoint( s:Sprite ):void {
  2. //translate movieclip
  3. var mark:Sprite = new Sprite( );
  4. mark.graphics.lineStyle( 1 , 0xFF0000 );
  5. mark.graphics.moveTo( -2 , -2 );
  6. mark.graphics.lineTo( 2 , 2 );
  7. mark.graphics.moveTo( -2 , 2 );
  8. mark.graphics.lineTo( 2 , -2 );
  9. s.parent.addChild( mark );
  10. }

Report this snippet  

You need to login to post a comment.