how to repeatedly duplicate mc with AS3
Hi, I need advice on how to duplicate MC from the library repeatedly. This code creates a copy of the MC (walking character) on the stage and then another function moves it. This works fine. But as soon as I click again, it doesn't work anymore. The first character stops and the second one goes 2x faster. I know that the problem is in the "akceb" variable, if they were named differently after each click, it would be fine. But I don't know how to do it. Please, give me an advice. Thank you
karta1Class=getDefinitionByName(karta1Name) as Class;
karta1Sprite=new karta1Class();
akceb = hraKartyKontejner.addChild(karta1Sprite);
akceb.addEventListener(Event.ENTER_FRAME, vyvolejPostavu);
function vyvolejPostavu(e:Event):void
{
//character shift
akceb.x = akceb.x+rychlost;
}
