1 Reply Latest reply on Apr 22, 2011 10:43 AM by Jason Szeto

    Problem with background image covering components

    malenam

      Hi,

       

      I created a skin for my ViewNavigator Component that loads an embedded image like so:

       

      <s:Image source="photos/image.png" top="80" bottom="0" left="0" right="0" >
          </s:Image>

       

      And this image is now covering the <List> component I had placed on the <View> component a mobile project.

       

      Is there a property I need to set to tell flex to superimpose the components (meaning superimpose my List on top of the View Image background?)

       

      Or any other solution?

       

      thanks

        • 1. Re: Problem with background image covering components
          Jason Szeto Level 3

          Malenam,

           

          We generally recommend that you create your mobile component skins using actionscript. You'll get better performance. If you take a look at ViewNavigatorSkin, you'll see in createChildren a contentGroup Group. The Views are added to this Group. So if you want your background to appear below the contentGroup, you can add your Image using addChildAt(myBackgroundImage, 0) or make sure you add your backgroundImage before the contentGroup has been added.

           

          For your actionscript skin, I'd recommend subclassing VIewNavigatorSkin, overridding createChildren and adding your background image there.

           

          Jason Szeto

          Flex SDK Engineer