1 Reply Latest reply on Dec 4, 2007 12:04 AM by Sreenivas R

    Runtime loading of XML file off a ComboBox selection

      I need to load an XML file at runtime based on a ComboBox selection that has the XML file path as its data.

      I figured out how to load an XML file at runtime by defining an HTTPService

      <mx:HTTPService id="stocksXML" url="xml/StockList.xml" resultFormat="e4x"/>

      and setting the <mx:Application creationComplete="stocksXML.send();"

      But when I now try to set the HTTPService url dynamically in the ComboBox change event handler

      private function loadData_changeHandler(event:ListEvent):void
      stocksXML.url = event.target.selectedItem.path;

      no data gets retrieved and the stocksXML.lastResult is null.

      What am I missing here? Why doesn't that work?
      Thanks in advance for any pointers