I'm just starting to study Flex 3 using ActionScript 3 and I got an issue with the alignment, I'm trying to make an "universal" function to align my Panel always in the middle, independetly of the resolution of the user.
I figured out that the Panel has the arguments X and Y, but if I put the values there it will be fixed and won't align the panel always the way I want.
Follow a image of what I'm doing so far:
This is my screen, you can see a write line around the panel, that is the panel I want to align in the middle, my panel will have always the size: 1024x768. I just want to keep it always in the middle page even if the user has a resolution bigger than this.
Any help will be very apreciated.
Well, it's very easy if the panel's container has a layout of absolute. If the Application has a layout property of absolute you can set two properties in the panel and lock the panel exactly in the center of Application. Those two properties are horizontalCenter and verticalCenter. You can set them to 0 and your panel will behave as you want.
Thank you Alberto, best-way solution.