Application container is the root container of any flex application. <mx:Application> tag is used in mxml file of the flex application to make the starting point of the execution of the application. The application container includes all the other child containers and controls. By default, it puts the child components vertically but you can lay them out horizontal and absolute. In the case of absolute positioning, you have to specify location of child components explicitly i.e. it doesn't provide automatic layout. In absolute layout , you have to specify the location by providing values to x and y coordinates otherwise (0,0) is default position.
The code below is the example of using application container:
|
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="458" height="242" backgroundGradientColors="[#FFFFFF, #bbbbbb]"> <mx:Panel width="200" height="200" layout="absolute" y="22" title="Panel 1" x="20"> </mx:Panel> <mx:Panel width="200" height="200" layout="absolute" x="239" y="22" title="Panel 2"> </mx:Panel></mx:Application> |
Output of the above code:

Download the source code:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Application container
Post your Comment