Posted By

edsonpavoni on 12/13/09


Tagged

simple square as3 geom


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

ClayVillage


Simple Square


 / Published in: ActionScript 3
 

  1. var square:Sprite = new Sprite();
  2. addChild(square);
  3. square.graphics.lineStyle(3,0x00ff00);
  4. square.graphics.beginFill(0x0000FF);
  5. square.graphics.drawRect(0,0,100,100);
  6. square.graphics.endFill();
  7. square.x = stage.stageWidth/2-square.width/2;
  8. square.y = stage.stageHeight/2-square.height/2;

Report this snippet  

You need to login to post a comment.