Hi friends,
I am making a number game please help me :-
I have a MovieClip in the library in that movieclip i have a dynamic text field named “numTxt” and i give class name “Ball” from linkage, now i want create 10 movieClip by addChild method.
i genrate random number in that text feild. and its workning fine.
but some times some numbers are repeating, thats the problum. the numbers should not be repeat.
var myBall:Ball;
for (var i:Number = 0; i<10; i++) {
myBall = new Ball();
addChild (myBall);
myBall.x = i * 100
myBall.newTxt.text = String(Math.ceil(Math.random()*100))
}
can anyone help me ???