//创建一个x~y之间的随机数(不包含y值),Math.round(Math.random() * (y - x)) + x;
//0-5之间的随机数,不包含5
var index: Number = Math.round(Math.random() * 5);
var colors: Array = ["#FF00FF", "#0000FF", "#000000", "#008000", "#800000"];
color = colors[index];
//15-25之间的随机数,不包含25
var index: Number = Math.round(Math.random() * (25 - 15)) + 15;
随机16进制颜色:Alert.show((Math.random()* 0xffffff).toString(16));
color = "#" + (Math.random()* 0xffffff).toString(16);