Search code examples
apache-flexflex4flexbuilderflex4.5

Flex make image full screen


when i run the image, it only appear in center with 2 blank white space in between.

<s:Image x="0" y="0" height="100%" width="100%" source="@Embed('assets/d.jpg')"/>

How can i make an image goes full screen (covering up the whole screen) with double tap/touch on mobile app?

And if possible how to turn it back to non-full screen (back to normal)?

thanks.

image size: W=1920, H=1200

enter image description here


Solution

  • To remove the white bars you're going to have set the scaleMode of the Image tag. The default is Letterbox; which is what you appear to be using.

    If you set it to stretch then it will fill the space, without the white border. However, it may distort the image by not maintaining the aspect ratio.