3 Replies Latest reply on Mar 23, 2007 10:28 AM by Fuel37

    Loading Static XML to Link Buttons and Text

    Fuel37
      Hi guys,

      I am attempting my first project for a client in flash and have a few questions. They want a type of survey thing where you click on an option and it shows you several more options and then they click on another option and it may show you more options or a block of text or a link etc.

      I've got the basic interface done and working, but, the catch is, the user wants to be able to maintain the content inside the application with dreamweaver, so what I proposed was keeping all the data in the survey, inside an xml file which they will edit and place back on the server.

      I've read most of the tutorials and what not that I think would relate to doing this but, I just can't seem to wrap my head around it.

      I have my xml doc structured like this:
      quote:


      ------------------questions.xml------------------
      <?xml version="1.0" encoding="iso-8859-1"?>
      <survey id="CSBCBusinessChecklist">
      <questions>
      <question id="1"><![CDATA[1. Entrepreneur Assessment (Do I have what it takes?)]]></question>
      <question id="1text"><![CDATA[Coming Soon!]]></question>
      <question id="2"><![CDATA[2. Business Licensing - General]]></question>
      <question id="2a"><![CDATA[A) Business Name Registration]]></question>
      <question id="2atext"><![CDATA[Coming Soon!]]></question>
      <question id="2b"><![CDATA[B) Taxation]]></question>
      <question id="2ba"><![CDATA[a) GST, Payroll, Import/Export, Income Tax]]></question>
      <question id="2batext"><![CDATA[Coming Soon!]]></question>
      <question id="2bb"><![CDATA[b) CPP]]></question>
      <question id="2bbtext"><![CDATA[Coming Soon!]]></question>
      <question id="2bc"><![CDATA[c) PST]]></question>
      <question id="2bctext"><![CDATA[Coming Soon!]]></question>
      <question id="2c"><![CDATA[C) Building/Space]]></question>
      <question id="2ca"><![CDATA[a) Zoning]]></question>
      <question id="2catext"><![CDATA[Coming Soon!]]></question>
      <question id="2cb"><![CDATA[b) Building Permits, Water & Land Use]]></question>
      <question id="2cbtext"><![CDATA[Coming Soon!]]></question>
      <question id="2cc"><![CDATA[c) Energy Efficiency]]></question>
      <question id="2cctext"><![CDATA[Coming Soon!]]></question>
      <question id="2cd"><![CDATA[d) Negotiating Your Commercial Lease]]></question>
      <question id="2cdtext"><![CDATA[Coming Soon!]]></question>
      .........
      </questions>
      </survey>




      Now, how do I get the data from that into my flex app and assign it to a button like this:
      quote:

      <mx:LinkButton x="35" y="100" label="C) Building/Space"/>



      or text like this:
      quote:

      <mx:AddChild relativeTo="{panel1}" position="lastChild">
      <mx:Text x="10" y="40" width="410" height="310">
      <mx:text><![CDATA[Coming Soon!.]]></mx:text>
      </mx:Text>
      </mx:AddChild>



      Thank you all in advance for your replies, I'm very new to the whole flash/flex realm so I really appreciate anyone who takes the time to help a nooob out. :)

      Thanks,
      TJ
      Text