0 Replies Latest reply on May 18, 2006 7:46 PM by loditferma

    formatting textfile for Combobox.dataProvider

    loditferma

      Can't seem to find any formatting rules for array construction through an external file.
      This is what i am trying to do:
      I've loaded vars into the _root this works fine. Splitted its value for constructing an array. This seems to work fine aswell.

      If I code the array within the fla in this format:

      my_dP= new Array(
      {label:"choose..."},
      {data:" http://www.myserver.com/netlabel/Johannes Lauxen.txt",label:"Johanes Lauxen"},
      {data:" http://www.myserver.com/netlabel/PQR1.txt", label:"PQR1"}
      );

      and use this for the dataProvider for the combobox named my_cb like this:

      my_cb.dataProvider = my_dP;

      everything works fine.

      The problem is:

      But if I put this in the same formatting in the textfile for the array I create using split like I described above, the values for my labels in my_cb are this text, i mean it doesn't interpretate the loaded text as script, it just displays the code as labels.
      my textfile looks like this :

      &var2={label:"choose..."}#{data:" http://www.myserver.com/netla
      bel/Johannes Lauxen.txt",label:"Johanes
      Lauxen"}#{data:" http://www.myserver.com/netlabel/PQR1.txt",
      label:"PQR1"}&


      (O, the # is used for delimiter)
      How can i get this to work ? Or is it not the textfileformatting that causes the problem ?
      many thanks
      (flash8 b.t.w.)