Use External Background Image in BorderContainer in ActionScript 3.0, Flex 4.6

Here is a BorderContainer, which uses an embedded image as background.

<s:BorderContainer width="100%" height="100%" backgroundImage="@Embed('Internal/Image.jpg')" visible="true">
    <!-- Some contents -->
</s:BorderContainer>

An easy way to use an external background image without creating a skin class is this:

<s:BorderContainer width="100%" height="100%"visible="true">
    <mx:Image source="External/Image.jpg" width="100%" height="100%" maintainAspectRatio="false"></mx:Image>
    <!-- Some contents -->
</s:BorderContainer>

Leave a Reply

Your email address will not be published.

72 − = 64