MX: MovieClip-swapClip. by admin | Apr 7, 2003 | Uncategorized | 0 comments When we need to replace a movie clip on stage with another with a Linkage ID the following code will be useful. [cc lang=”actionscript3″] 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); [/cc] Usage: [cc lang=”actionscript3″] my_mc.swapClip(“MyLinkageID“); //MovieClip instance named my_mc will be replaced by another clip. [/cc] Submit a Comment Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Δ