createEmptyMovieClip("triangle_mc", getNextHighestDepth()); triangle_mc.beginFill(0x006090); triangle_mc.moveTo(50, 50); triangle_mc.lineTo(100, 150); triangle_mc.lineTo(0, 150); triangle_mc.lineTo(50, 50); var hit_X = 100; var hit_Y = 75; var shapeFlag = true; triangle_mc.onPress = function() { this.startDrag(); }; MovieClip.prototype.addOnRelease = function (fName){ if(this.ORARR == undefined) { this.ORARR = []; } this.ORARR.push(fName); this.onRelease = function() { this.ORARRINIT(); } } MovieClip.prototype.removeOnRelease = function (fName) { var t:Object = new Object(); var i=0; while (t=this.ORARR[i]) { //trace(t); if(t == fName) { this.ORARR.splice(i,1); } //trace(this.ORARR); i++; } } MovieClip.prototype.ORARRINIT = function() { //trace(invoker); var t:Object = new Object(); var i=0; while (t=this.ORARR[i]) { //trace(t); t.apply(this); i++; } } function myThing() { trace("myThing"); } function yourThing() { trace("yourThing"); } function stopDragInit() { this.stopDrag(); } triangle_mc.addOnRelease(myThing); triangle_mc.addOnRelease(yourThing); triangle_mc.addOnRelease(stopDragInit); triangle_mc.removeOnRelease(myThing);