3 Replies Latest reply on Feb 19, 2007 6:06 PM by phi2265

    Loading XML with actionscript

      How do I load XML into flex by using actionscript in the <mx:script> / CDATA tags and NOT with HTTPservice?
        • 1. Re: Loading XML with actionscript
          ctzn99 Level 1
          Where are you trying to load the XML from?

          If it's just xml that you want to be able to type into the script area do this:

          [Bindable] // <-- Use the bindable attribute modifier so that your data driven elements can use as an updateable dataprovider.
          private var templateXML:XML =
          <template label="Second Template">
          <section label="Section 1">
          <field label="Field 1 - 1" />
          <field label="Field 1 - 2" />
          </section>
          <section label="Section 2">
          <field label="Field 2 - 1" />
          </section>
          </template>; // <-- Don't forget the semicolon down here.
          • 2. Re: Loading XML with actionscript
            ntsiii Level 3
            Are you going for compile-time or run-time loading?
            Tracy
            • 3. Re: Loading XML with actionscript
              phi2265 Level 1
              Compile-time huh? Right now I'm using HTTPService and the XML loads at run-time. How do you load XML at compile-time? Is it with embedding? That would solve some of the annoyances I have with my application.

              Thanks..