Custom main window

What’s the best way to have a Custom window component as your main app window in AIR (built in Flex)? Is it within the mxml, or to create it dynamically as I’m having issues either way?