Posted By

f6design on 10/21/10


Tagged

actionscript rectangle Drawing as3


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

adamcoulombe
sexyflash
tspitzr


Draw a rectangle using AS3


 / 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();

Report this snippet  

You need to login to post a comment.