/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var box:Shape = new Shape(); var random_color:Number = Math.random() * 0xffffff; box.graphics.beginFill(random_color, 1); box.graphics.drawRect(0, 0, 100, 100); box.graphics.endFill(); this.addChild(box);