6 Replies Latest reply on Aug 27, 2006 8:09 AM by inlineblue

    Need Help with EventListeners

    targetplanet Level 1
      I have a component called MessageBox that is being used as a custom popup using the PopUpManager.
      The component has a textField into for a user to enter a message.
      I need to capture the text from the text field. I set up an event that is dispatched from the MessageBox compnent passing the text in a custom event object.

      The problem I am having is catching the event.
      I know usually to handle an event in a component, I have to put the event name in the component render tag.
      But since this component is used in the PopUp, I can't figure out how to handle the event dispatched from the component.
      Is it possible?
      This is the code for creating the popup.
      mWin = PopUpManager.createPopUp(this,MessageBox,true);
      mWin.ttl = "Message to "+iData.regFirstName;
      mWin.x = stage.width/2 - mWin.width/2;
      mWin.y = 200;