Kevin
Kevin

Reputation: 23634

Align center in Flex

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundImage="images/Login_01.jpg" verticalCenter="0"
            horizontalCenter="0"
 width="800" height="600" horizontalAlign="center" verticalAlign="middle" >

I need to align the background image in center, but its not working... its going towards to left for different resolutions.

Upvotes: 1

Views: 9404

Answers (2)

cliff.meyers
cliff.meyers

Reputation: 17734

  1. Set layout="absolute" for your Application
  2. Add an Image component as the first child of the Application
  3. Set the horizontalCenter="0" and verticalCenter="0" on the Image component

Upvotes: 3

Vugluskr
Vugluskr

Reputation: 1436

Make canvas with this image, and center canvas.

Upvotes: 1

Related Questions