1 Reply Latest reply on Sep 6, 2006 7:17 AM by injpix

    Temporarely disable Eventhandlers

      I build a moveable, editable TextField by creating an AS 2.0 Class derived from UIObject (MovieClip with TextField - Child).
      This Object should listen to onPress (for Drag'n Drop Action) and onRelease (also D&D and for indicating a Doubleclick).
      On DoubleClick the Focus is set on the Textfield (by Selection.setFocus()). Now the whole Text is selected. With a single Click inside I want to set the Caret at the Mouseposition. But the parent MovieClip executes it's onPress and onRelease methods and Textfield's focus is lost.

      Does anyone has an idea how to disable the eventhandler temporarely when the Textfield is in the Editing status?
        • 1. Re: Temporarely disable Eventhandlers
          injpix Level 3
          The code below will hopefully show you how to disable an EventHandler. If you put this code on frame one of the main timeline with a movieclip named “ball_mc” and if the user clicks on ball_mc it will essentially disable it. However now you need another event to enable it.