1 Reply Latest reply on Sep 18, 2007 4:40 PM by TeotiGraphix

    Event Listener for change to a text field

      Hi all,
      I currently have my project set up with a list of locations in a panel on the right side of the screen, which is populated by an XML feed and details and a map for the location in a panel in the center of the screen. Everything displays fine and right now I have a "Go" button which sends the address data from the text fields (supplied by the same XML feed) to a function which then makes the appropriate changes and displays the map of that location. What I would like to do is write an event listener that would monitor the address field for changes (when I click on a different location) and then call my map function to automatically load the map. In other words, right now if I click a location from the list, all the details of that location are updated, but I have to click "Go" to call my function and load the new map. Can someone please help, as I am struggling with this.

      Thanks in advance

        • 1. Re: Event Listener for change to a text field
          TeotiGraphix Level 3

          In the handler for the Go button, encapsulate that functionality into a method. Then if the clicking on a list is actually a List, use the itemClick event of the list and in that handler call the Go logic you encapsulated.

          private function goLogic():void

          private function list_itemClickHandler(event:ListEvent):void

          Peace, Mike