3 Replies Latest reply on Aug 9, 2008 12:48 PM by Newsgroup_User

    Connecting Flex to PHP returned XML

    Arthur-Lockman Level 1
      Hello! im new to flex and i have a question that i am hoping someone can answer. I have a flex app that i am building that needs to display a list of dynamic images, preferably with icons. I've built the Title list, but i don't know how to connect the HTTPService data to the list. the HTTPService is returning XML data, so it must be easy. but, as i said, Im really new. Please Help Me!!
        • 1. Re: Connecting Flex to PHP returned XML
          justria
          I'd propose to use AMFPHP, which passes data using Flash' native AMF format. Please review this site, which provides the lib and great examples:

          http://www.amfphp.org/
          • 2. Re: Connecting Flex to PHP returned XML
            Arthur-Lockman Level 1
            I do like that idea, but I have an existing site that is built off of many PHP scripts that i am developing for AIR. All i have to do is change the output to XML and the app is done. So, i'm reluctant to use AMFPHP for that reason.
            • 3. Re: Connecting Flex to PHP returned XML
              Level 7

              "arthurlockman" <webforumsuser@macromedia.com> wrote in message
              news:g7kk4g$177$1@forums.macromedia.com...
              > Hello! im new to flex and i have a question that i am hoping someone can
              > answer. I have a flex app that i am building that needs to display a list
              > of
              > dynamic images, preferably with icons. I've built the list, but i don't
              > know
              > how to connect the HTTPService data to the list. the HTTPService is
              > returning
              > XML data, so it must be easy. but, as i said, Im really new. Please Help
              > Me!!
              >

              Depending on what you're wanting to do, you can either use a Repeater with
              an Image or custom component that contains an Image or you can use a List
              based component to display an Image or custom component with an Image (or
              SwfLoader, or Loader) in it. There is literally a ton of stuff about this
              in the Help. Here are some places you may want to try:

              Help>Flex Start Page>Creating a Simple RIA
              Help>Help Contents>User Interfaces
              - Using Data Providers and Collections
              - Controls
              - Image
              - SwfLoader
              - Using Data Driven Controls
              - Using Item Renderers and Item Editors
              - Dynamically Repeating Controls and Containers

              Here is an example that might get you running fast *if* you are not the type
              to read the docs:

              http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html

              HTH;

              Amy