2 Replies Latest reply on Feb 9, 2010 12:06 PM by alice_data

    How to Embed an SVG From HTTPService?

    alice_data Level 1

      Hi,

       

        My SVG file is the ouput generated from a PHP file, because I am trying to use the PHP with parameters that allows me to have further customizations. After reading some of the tutorials on http://www.adobe.com/devnet/flex/quickstart/embedding_assets/, and looks like that I have to embed SVG if I get it to display. The problem is, it looks like that it does not like seeing the extension PHP when I have the following in my Flex app:

       

         [Embed(source="http://localhost/population_5grade.php")]
         [Bindable]public var SvgMap:Class;
           
         <mx:Image id="myLogo" source="{SvgMap}"/>

      When I try to compile the code, I get these errors:

         1)Unable to transcode http:/localhost/population_5grade.php.
         2)'http://localhost/population_5grade.php' does not have a recognized extension, and a mimeType was not provided

      Is there something wrong I have done here? How can I display the SVG in this case if I cannot embed it?
      Thanks for your help.

      Alice