App.mxml
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="LayoutTestImpl.main()"/>
AppImpl.as
package {
import mx.controls.*;
import mx.core.*;
public class AppImpl {
public static function main():void {
new AppImpl().startApp();
}
public function startApp():void {
var helloLabel:Label = new Label();
helloLabel.text = "Hello World";
var app:Application = Application.application as Application;
app.layout = "vertical";
app.addChild(helloLabel);
}
}
}