Draw a rectangle using AS3


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



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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.