2 Replies Latest reply on Aug 4, 2011 10:29 PM by Shongrunden

    Best practice for Spark repeating background image in a SkinnableContainer?

    rexdtripod Level 1

      In my old Flex 3.5 code I would accomplish this by dropping an Image into a Canvas and hitting the Canvas with some css style stuff to get the repeat.  The Image tag had a source property that would take a web address so I could dynamically grab different images from the web based on some conditions.  Little bit more trouble with Flex 4.5 and Spark but I'm trying to get there.


      Here Adobe docs explain how to *embed* a background image:


      http://help.adobe.com/en_US/flex/using/WS422719A4-7849-4921-AF39-57FF567B483B.html#WS063B0 491-B7AB-4b00-A39F-E44310BCB0E0


      They use a BitmapFill object in the skin.


       <!-- background fill -->
          <s:Rect id="background" left="3" top="3" right="3" bottom="3" alpha=".25">
                  <s:BitmapFill source="@Embed(source='../../assets/myImage.jpg')"/>


      Problem is I need to do this without embedding the image.  In my old code I grabbed the image from web (set source property on Image tag to web address).  What's the best practice for achieving this with a skinnable container?  The BitmapFill object used above won't take a web address for a source.


      Thanks in advance.