![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
var
itn:Array
=
new
Array();
while (itn.length != 10 ){
// 最主要的代码就是下面这句,你要取多大,后面模一下,我觉得这样挺方便的~
var temp: int = (Math.random() * 1000 >> 0 ) % 16 ;
trace( " 这次出来的是: " + temp);
if (itn.length != 0 ){
for ( var h: int = 0 ;h < itn.length;h ++ ){
if (temp == itn[h]){
h = 0 ;
temp = (Math.random() * 1000 >> 0 ) % 16 ;
}
}
}
itn.push(temp);
}
trace( " 全部数字是: " + itn);
while (itn.length != 10 ){
// 最主要的代码就是下面这句,你要取多大,后面模一下,我觉得这样挺方便的~
var temp: int = (Math.random() * 1000 >> 0 ) % 16 ;
trace( " 这次出来的是: " + temp);
if (itn.length != 0 ){
for ( var h: int = 0 ;h < itn.length;h ++ ){
if (temp == itn[h]){
h = 0 ;
temp = (Math.random() * 1000 >> 0 ) % 16 ;
}
}
}
itn.push(temp);
}
trace( " 全部数字是: " + itn);