0 Replies Latest reply on Nov 28, 2011 3:44 PM by Gretar

    Load FXG from assets in runtime

    Gretar

      Hi

       

      I have read alot of old articles from 2009 and 2010 about how it is not possible to load multiple FXG in runtime... is that still the case?

       

      I've been trying to get FXG to work in my Flex app, it works and renders fine but what I'm trying to accomplish is a sort of a gallery with data about the images in a database. I used to be able to use<s:Image source=/path/{variable_name}> but now I have to import the FXG files and can't use<s:Image> anymore. Here I can display a static FXG image.

      <?xml version="1.0" encoding="utf-8"?>
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
             
      xmlns:s="library://ns.adobe.com/flex/spark"
             
      xmlns:fxg="assets.fxg.*"
             
      tabBarVisible="false" title="{data.name}">

         
      <fxg:megapicture001 x="118" y="27" width="338" height="519"/>

         
      <s:Label x="78" y="43" text="{data.name}"/>

         
      <s:navigationContent>
             
      <s:Button icon="@Embed('assets/home.png')" click="navigator.popView()"/>
         
      </s:navigationContent>

      </s:View>

      Trying to do <fxg:{data.picturename} /> blows up. I've tried all the escaping I know but I'm a complete noob to Flex, and programming in general. Any nudge in the correct direction is appreciated!

       

      Does flex sdk 4.6 have better support for this?