2 Replies Latest reply on Jan 31, 2008 6:16 AM by

    Fluid SWF as application background

      I have created a fluid-type swf in flash that I'd like to use as the background of my flex app. I created a stylesheet and set the application style to

      Application{
      backgroundImage: Embed(source="/FluidBG.swf#FluidBG");
      backgroundSize: "100%";
      }

      but it still shows the default "blue/gray" background. How do I do this?
        • 1. Re: Fluid SWF as application background
          peterent Level 2
          I've never seen anyone try to do this before. It might very well be possible and does seem logical. Could you try a couple of experiments to help narrow down the problem?

          1) Change the syntax: Embed(source='filename',symbol='symbolWithout#');
          2) Move the embed to the <mx:Application> root tag, removing it from the CSS file.
          3) Create a Canvas in your app and code the Embed right in the HTML. If that works, move it to the CSS file.

          I'm wondering if the issue is with the Application or the Embed syntax or the combination.
          1 person found this helpful
          • 2. Re: Fluid SWF as application background
            I think the problem is that my swf is not recognizing the stage size. I did a quick test with another mc in the swf (still using the css, but with a different mc name after the #), and it appeared and stretched. I will do some additional testing to see where the breakdown occurs and will post back.

            One other thing I'm having problem with is flex builder (Version: 2.0.167022) telling me "CSS Value for 'backgroundSize' not supported." Even though it's documented this way and the StyleExplorer creates this syntax...

            here is the syntax of my style (the first post had quotes around the 100%):

            Application{
            backgroundImage: Embed(source="/FluidBG.swf#FluidBG");
            backgroundSize: 100%;
            }