In order to set a background image for my Desktop Flex application, I created a custom skin class, setting the skinClass property to my custom MXML skin. The host component is SkinnableContainer. I use a bitmap image for the custom MXML skin. Everything works fine, except that it's drawing over all my components. How do I get the skin to draw in the background? Should I move the Bitmap markup to somewhere else in my skin file?
1
votes
1 Answers
2
votes
If you are using the Flash Builder template for a SkinnableContainer Skin just make sure you insert the image object (eg, BitmapImage) in front of the background:Rect but behind the contentGroup:Group. The contentGroup is where all visible display elements from the Application are displayed.
Example
<s:Rect id="background" left="0" right="0" top="0" bottom="0">
...
</s:Rect>
<s:BitmapImage source="@Embed('assets/images/background.png')"/>
<s:Group id="contentGroup" ...>
...
</s:Group>