1 Reply Latest reply on Nov 9, 2009 5:53 AM by CoreyRLucier

    How to embed FXG?


      Hi all,


      I'd like to use a couple of FXG-graphics for a component.

      This used to work in Beta 1:


      <mx:Image source="{data.bitmap}" id="myImg" />


      While somewhere else in the code I could make an arrayCollection containing:

                  <fx:Object id="Item1"
                             name="Item 1"
                             bitmap="@Embed('/assets/graphics/ico_OrdnerBlue.fxg')" />
                  <fx:Object id="Item2"
                             name="Item 2"
                             bitmap="@Embed('/assets/graphics/ico_OrdnerYellow.fxg')" />
                  <fx:Object id="Item3"
                             name="Item 3"
                             bitmap="@Embed('/assets/graphics/ico_OrdnerGreen.fxg')" />


      But now it doesn't work anymore with Beta2.


      What should I replace mx:Image with, so it can show FXG Graphics?


        • 1. Re: How to embed FXG?
          CoreyRLucier Adobe Employee

          That embedding option was removed in favor of FXG documents now being 

          first class components.


          e.g. The document MyGraphic.fxg will yield a new class (MyGraphic) 

          which can be instantiated as a display object directly via new