Draw an 'x' at DisplayObject' registration point


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.