Posted By

flashinit on 06/17/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

toxin20
thastylos


Random color picker


 / Published in: ActionScript 3
 

  1. var box:Shape = new Shape();
  2. var random_color:Number = Math.random() * 0xffffff;
  3. box.graphics.beginFill(random_color, 1);
  4. box.graphics.drawRect(0, 0, 100, 100);
  5. box.graphics.endFill();
  6. this.addChild(box);

Report this snippet  

You need to login to post a comment.