ActionScript 3 Random Color 19th November 2008 I wanted to test something with different colors, turns out it’s easy to pick a random color: 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);Copy Share Article
Comments: None so far...be the first!