spirton
09-17-2007, 10:22 PM
hello
after playing with AS1 3 years ago I returned this year to find half of what i knew changed. Still determined to make AS3 work for me I wonder:
How can I dynamicly istantiate a group of movie clips?
the following code doesn't work of course but it gives an idea of what i'm trying to do.
for (var i:int = 0; i < 50; i++) {
var starlet[i]:Star =new Star();
starlet[i].x = Math.floor(Math.random( )*550);
starlet[i].y = Math.floor(Math.random( )*400);
addChild(starlet[i]);
}
any ideas?
thnx a lot!
after playing with AS1 3 years ago I returned this year to find half of what i knew changed. Still determined to make AS3 work for me I wonder:
How can I dynamicly istantiate a group of movie clips?
the following code doesn't work of course but it gives an idea of what i'm trying to do.
for (var i:int = 0; i < 50; i++) {
var starlet[i]:Star =new Star();
starlet[i].x = Math.floor(Math.random( )*550);
starlet[i].y = Math.floor(Math.random( )*400);
addChild(starlet[i]);
}
any ideas?
thnx a lot!