I converted some images to movieclips in animate cc, images are text exported to .png and they are different in width same in height. Both are in library and stage but in different position and in same Frame, I need to swap/replace each other in different cases with code.
I used blow code for this purpose but nothing happened.
Code:
var mc:MovieClip = new MovieClip();
addChild(MC_TEXT21);
mc.x =642;
mc.x =495;
trace("mc: "+mc);
trace("MC_TEXT21: "+MC_TEXT21);
trace(mc.stage);
trace(mc.root);
Console:
mc: [object MovieClip]
MC_TEXT21: [object MovieClip]
null
null