8 Replies Latest reply on Apr 9, 2009 12:51 PM by Handycam

    Can I assign an embedded image on the fly?

    Handycam Level 1

      My component has an image control. I am creating a series of instances of this component with a loop.

       

      I can assign the images to each like this: recipeStep.stepImage.source= "assets/"+stepNumber+".png";

       

      But this requires the images to be in that path at runtime, which I'd rather not do in this case.

       

      So I tried: recipeStep.stepImage.source= "@Embed(source='assets/"+stepNumber+".png')";

       

      Which yields a broken image.  What am I missing?

       

       

      P.S. I f I trace stepImage.source I get [class _SWFLoaderStyle__embed_css_Assets_swf___brokenImage_323519580]