Re: [Flashcoders] as3 creating sprite instances in a loop

2008-01-02 Thread Charles Parcell
I think the issue is that you are waiting until you exit the loop to do any addChild() calls. In that case you will only ever get one sprite added to the display list. This is because when the loop is done it only has a single reference to a sprite. You might want to do two things. First, and

[Flashcoders] as3 creating sprite instances in a loop

2007-12-30 Thread Matt Muller
Hi, does anyone know how to create individual sprite instances in a loop for (var j:uint = 0; j _columns; j++) { var sprite:Sprite = new Sprite(); } this just over writes the sprite. thanks MaTT

Re: [Flashcoders] as3 creating sprite instances in a loop

2007-12-30 Thread Piers Cowburn
I'm not quite sure if I understand your question fully but I think the problem you're having is that you need to do something with them - for example if you pushed each new sprite into an array then you'd have a reference to each of them, but the you're doing it at the moment you'll just

Re: [Flashcoders] as3 creating sprite instances in a loop

2007-12-30 Thread Andrei Thomaz
and, of course, you can't forget addChild(). []'s andrei On Dec 30, 2007 2:50 PM, Piers Cowburn [EMAIL PROTECTED] wrote: I'm not quite sure if I understand your question fully but I think the problem you're having is that you need to do something with them - for example if you pushed each