2 Replies Latest reply on Apr 19, 2006 8:02 AM by truly_great

    Background Image not spanning width

    truly_great Level 1
      I am developing with Flex 2.0 and am having a problem. I have set up the background image - it shows, but there is a major problem. If I place a Flash 8 swf as the image, it fills the height, but only 2/3 of the width of the browser window. If I use a gif (which I don't want to do), it fills the window like it should.

      Im using:

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" backgroundColor="0xFFFFF9" styleName="style1" backgroundSize="100%" themeColor="haloSilver">

      <mx:Style>
      .style1 { backgroundImage: Embed("bin/backgrounds/myBackground.swf");
      }
      </mx:Style>

      Any ideas?

      Thanks

      Thia
        • 1. Re: Background Image not spanning width
          Chester_Copperpot
          I'm pretty sure there is a bug when loading a swf inside an application. I have been working for about a week or so to get it to work using the <mx:Loader> class but no dice. Images work fine, swf files do not. Pretty sure its a bug.

          Chris
          • 2. Re: Background Image not spanning width
            truly_great Level 1
            Well, I suddenly have it working - I downloaded Flex Style Explorer and notice that their swfs work just fine. So, I resized mine to 1025x769 and at first it made no difference.

            Then I changed the code to:

            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" styleName="style1" backgroundColor="0xfffff1" backgroundSize="100%" themeColor="haloSilver">


            <mx:Style>
            .style1 { backgroundImage: "images/myBackground.swf";
            }
            </mx:Style>

            I am sure I didn't embed the swf the first few times and it didn't work at all - but who knows - anyway, this spans it the entire width and heigth now

            Thia