if (i == 64){ var hero:DisplayObject = //тут нужно откуда-то достать экземпляр. map.addChild(hero); heroList.push(hero); i = 1; }