6 Replies Latest reply on Dec 14, 2006 6:58 AM by boybles

    Sending Data with Flex SWF

    boybles
      Is there a way to send the results of an initial query (in XML format) with the Flex swf so that a combo-box in the Flex application can read the XML rendered in the same HTML file?
      Thanks,
      Tony
        • 1. Re: Sending Data with Flex SWF
          ntsiii Level 3
          You question is not clear. Please rephrase with additional detail.

          Tracy
          • 2. Re: Sending Data with Flex SWF
            boybles Level 1
            Say a client browser gets the Flex swf contained in a page with other HTML components tables, gifs, form elements, etc. Is there a way for the Flex swf to ingest any of the data from the HTML page that embeds it?
            • 3. Re: Sending Data with Flex SWF
              ntsiii Level 3
              Yes. You can send data into Flex using flashvars. Also, javascript can dynamically talk to the Flex app. Look into "ExternalInterface" in the docs.

              Tracy
              • 4. Re: Sending Data with Flex SWF
                boybles Level 1
                Tracy,
                Thanks for your response. Yes, I know of these two methods...but then I thought there may be yet another way with Flash. I was looking at this Flash menu http://f-source.com/buy/macStyleMenu/ where the swf is included in the html page and somehow the swf reads in the div tags. There seems to be something more than just flashvars at play here... all of the static div values are somehow passed into the swf. I'm sure the same technique could be used to pass a lot of data to the Flex swf from an html (or cfm/asp/php etc.) page. Any ideas?
                Tony
                • 5. Re: Sending Data with Flex SWF
                  ntsiii Level 3
                  Javascript can dynamically talk to the Flex app. Look into "ExternalInterface" in the docs.

                  Tracy
                  • 6. Re: Sending Data with Flex SWF
                    boybles Level 1
                    Tracy,
                    Again thanks for your help. ExternalInterface would be a great way to go, but it has very big limitations on the types of browsers/versions it's compatible with. In my case that would render one of my initial reasons for choosing Flex as a technology for many platforms/browsers moot. I was hoping that there was a way to pass complex variables/structures to the swf using something other than flashvars (which doesn't lend itself to easily passing complex structures) or ExternalInterface (which is nice...but has many limitations). Perhaps there isn't another way..but I was hopeful that there was something out there. Again, as always I appreciate your insight.
                    Tony