mc1.onRelease = function() { this.stopDrag(); if (this.hitTest(c1)) { this._x=c1._x+(c1._width-this._width)/2; this._y=c1._y+(c1._height-this._height)/2; } };