duplicate movie clip
hi, here is the deal. i asked an equivalent of 'duplicate movie clip' long ago, but i didnt use it though i knew i was going to use it in the future. the answer i got back then didn't work, i tried something else i found in another forum, here is what i tried:
create new empty flash project.
in this, at firt i imported a bitmap into stage and after converting it into movie clip, called it 'template'
what i think should happen is that a duplicate of the movie clip should appear in (0, 0). didn't work first way so i tried second way i found in another forum. this is all the code in the movie:
/*
var classObj: Object = getDefinitionByName( getQualifiedClassName( this.template ) );
var newClassObj = new ( classObj );
newClassObj.x = 150;
newClassObj.y = 150;
this.addChild(newClassObj);
*/
var targetClass:Class = Object(template).constructor;
var duplicate:DisplayObject = new targetClass();
duplicate.visible = true;
duplicate.x=0;
duplicate.y=0;
addChild(duplicate);
things in /* */ are first way i got as answer some time ago, the things outside commenta re the new way i found in another forum. as i said before this should show on stage a duplicate of 'template', if it worked as expected. but it didnt in any case. any poinetrs?. i also tried with a doodle instead fo a bitmap with same result
