samWhisker
12-29-2008, 01:37 PM
I have done a lot of reading on this subject and of course support is weak. i have tried oh so many things and the closest i have come is the class by senocular.
This works as a class perfectly, however if you try and duplicate a movie clip that has nested children they do not copy accross just the parent. let me explain
import duplicateDisplayObject;
//i create a holder for my duplicateed movie clip
var mHolder:MovieClip = new MovieClip();
addChild(mHolder);
// i add lots of different movies to it
var m1 = new mcBg1();
mHolder.addChild(m);
var m2 = new mcBg2();
mHolder.addChild(m);
var m3 = new mcBg3();
mHolder.addChild(m);
// use the class here to copy 'mHolder' the parent of the movie clip 'm'
var newInstance:DisplayObject=duplicateDisplayObject(m Holder,true);
newInstance.x=200;// shift to see duplicate
trace(newInstance.width)
So the result of this i guess is mHolder been duplicated and not the movie/movies attached. does anyone have a theory on this?
cheers guys:cool:
This works as a class perfectly, however if you try and duplicate a movie clip that has nested children they do not copy accross just the parent. let me explain
import duplicateDisplayObject;
//i create a holder for my duplicateed movie clip
var mHolder:MovieClip = new MovieClip();
addChild(mHolder);
// i add lots of different movies to it
var m1 = new mcBg1();
mHolder.addChild(m);
var m2 = new mcBg2();
mHolder.addChild(m);
var m3 = new mcBg3();
mHolder.addChild(m);
// use the class here to copy 'mHolder' the parent of the movie clip 'm'
var newInstance:DisplayObject=duplicateDisplayObject(m Holder,true);
newInstance.x=200;// shift to see duplicate
trace(newInstance.width)
So the result of this i guess is mHolder been duplicated and not the movie/movies attached. does anyone have a theory on this?
cheers guys:cool: