[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

ListBox Component dynamically selecting xml source from user selection in another listbox

I have a three column layout.  Column one is a list box. Selecting an item from column one, presents the user with a selection of sub-items in listbox two (column two of the layout).  The xml data I am using for options/sub options is extrememly large and cannot be reformatted (I can't redevelop the node structure with further sub nodes etc...)  I want to assign the url of the xml connector for column two dynamically using actionscript based on the users selection from the first list box - or something else which will achieve the same effect(!) I've tried various actionscript in the on change() handler of the first column, but nothing seems to work.

instance name of listbox to be changed - selectList
instance name of xml connecter - dynamicXML
instance name of listbox 1 (column one) - serviceList

I have set up the xml connector for column two with an initial URL and the xml is triggered and sat in frame one of the movie with all other actionscript and data connections for the movie.

I'm using flash mx 2004 Professional, v7.2  on Mac os X 10.3.6.

Please help!
1 Solution

Can you attach a snippet of your XML file structure?
this is a possible solution:

var responder:Object = new Object();
responder.change = function(evt:Object):Void
      dynamicXML.URL = evt.target.selectedItem.data.your_data_with_xml_url;
responder.result = function(evt:Object):Void
      // do what you want with loaded data
selectList.addEventListener("change", responder);
dynamicXML.addEventListener("result", responder);

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now