Generate dynamic objects in Flash
I'd like to use a conditional loop to generate objects dinamically and i'd like to know if it is possible to do this in Flash.
I try to explain better what i want to do; i have to let users to choose a number of balls to display on the stage, something like this:
var balls; //it contains the numbers picked by the user
if ( balls == 0) display nothing on the stage;
if ( balls != 0){
for (n < balls){
plot a ball on the stage
}
}
How it is possible to generate objects by looking on user decisions?
At the moment, i just know how to add a given number of objects on the stage and how to arrange them, but i do not know how to generate them depending on the user choices.
Can you help me?
I tryed to search on google, but i found nothing: what kind of tutorial should i read to accomplish this task?
Thanks to all.