Home     |     Photoshop    |     Flash General    |     Flash Actionscript    |     Dreamweaver    |     Macromedia Fireworks


Cervo Technologies
The Right Source to Outsource

Macromedia Flash Actionscript

AS3 - Creating dynamically named sprites within another sprite


I'm trying to create sprites in another sprite where the inner sprite
is dyamically named based on an array index number. Does anyone know
if this is possible. I've tried it with teh array access operator as
follow, but it didn't work.

var parentSprite:Sprite = new Sprite();
addChild(parentSprite);
var subSprite:Sprite = new Sprite();
parentSprite["dynName"+1] = subSprite;

help would be appreciated--thanks.

keith

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc