I would like my BitmapImage to scale according to the width of Label.
Here is a very simple piece of code:
<s:VGroup>
<s:BitmapImage width="100%" source="@Embed('/image.png')" fillMode="scale" scaleMode="stretch"/>
<s:Label text="Short"/>
</s:VGroup>
<s:VGroup>
<s:BitmapImage width="100%" source="@Embed('/image.png')" fillMode="scale" scaleMode="stretch"/>
<s:Label text="Very long message"/>
</s:VGroup>
Here is the output:

As you can see, my image is upscaling willingly, while it doesn’t downscale at all.
What’s the reason behind it? Is there an easy solution?
Note: it is not an option for me to set the width of BitmapImage to the width of Label.
pasted my comment as answer for this.
width=”100%” says – get as big as me… or the biggest thing in my container. If you want it to fit the label.. tell it width=”{label.width}”.. EDIT… then set width=”{myLabel.width}”