I am trying to duplicate a MovieClip on the stage...then replace another clip on the stage with the duplicated clip...I almost have it . . . can anyone offer some guidance as to why this isn;t working...or maybe there is a better way.
PHP Code:
red.duplicateMovieClip("rectangle", 1);
rectangle._xscale = 200;
//
MovieClip.prototype.swapClip = function(idName) {
var obj = {_x:this._x, _y:this._y, _xscale:this._xscale, _yscale:this._yscale, _rotation:this._rotation, _visible:this._visible, _alpha:this._alpha, idName:idName};
this._parent.attachMovie(idName, this._name, this.getDepth(), obj);
};
ASSetPropFlags(MovieClip.prototype, ["swapClip"], 1);
holder.swapClip("rectangle");
//MovieClip instance named my_mc will be replaced by another clip