You only need to delete the function, not set it to null. By setting it to null, the player still has a reference to the function whether it's null or not. Hope that helps.
Myles -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alberto Florentin Sent: Wednesday, June 21, 2006 10:45 AM To: Flashcoders mailing list Subject: [Flashcoders] getting rid of the "over a button like" little hand over a movieclip I am sure this has been discussed before, but cannot find it I have a programmatically created movieclip, mclip, with some code that assigns functions to mouse events, like this: <code> private function initMouseActions() { mclip.owner = this; mclip.onRollOver= function() { this.owner.notifyListeners("RollOver"); } mclip.onRollOut = function() { this.owner.notifyListeners("RollOut"); } mclip.onMouseDown = function() { if (this.hitTest(_xmouse, _ymouse, true) ) { this.owner.setClicked(true); this.owner.notifyListeners("MouseDown"); } else this.owner.setClicked(false); if (this.owner.clicked == true) this.owner.setDragging(this.owner.clicked); } mclip.onMouseMove = function() { if (this.hitTest(_xmouse, _ymouse, true) ) { this.owner.notifyListeners("MouseMove"); } } mclip.onMouseUp = function() { this.owner.mouseDown = false; if (this.owner.clicked == true) { /* TODO next 2 actions should be handled * by listeners after notify */ this.owner.setDragging(false); this.owner.startDrag_ = false; this.owner.notifyListeners("MouseUp"); } } } </code> This works as expected. When I want to "freeze" or unfreeze the movieclip, I use <code> public function set frozen(b:Boolean) { if (b==true) { delete mclip.onRollOver; mclip.onRollOver=null; delete mclip.onRollOut; mclip.onRollOut=null; delete mclip.onMouseDown; mclip.onMouseDown=null; delete mclip.onMouseMove; mclip.onMouseMove=null; delete mclip.onMouseUp; mclip.onMouseUp=null; } else initMouseActions(); } </code> This also works ok, BUT the cursor stays the "over a button" style of a little hand. Why is that? And how can I get rid of it, short of using commands to change the cursor? Thanks a lot Alberto _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ************************ MLB.com: Where Baseball is Always On _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com