# Converting from MXML to AS3

**URL:** https://forum.kirupa.com/t/converting-from-mxml-to-as3/297556
**Category:** flash
**Created:** [October 5, 2009, 11:14am UTC](https://forum.kirupa.com/t/converting-from-mxml-to-as3/297556 "2009-10-05T11:14:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![superpeppe](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@superpeppe](https://forum.kirupa.com/u/superpeppe)
#### Post date: [October 5, 2009, 11:14am UTC](https://forum.kirupa.com/t/converting-from-mxml-to-as3/297556/1 "2009-10-05T11:14:33Z")

</div>

Hi can any of you convert the following Flex to AS3, I have tried -keep-generated-actionscript but it just gives a lot of confusing code.

```auto
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="main()">
    <mx:Script>
    <![CDATA[
    import mx.core.Window;
    
    private function main( ) : void {
        var window:Window;
        for ( var i:int = 0; i < 5; i++ ) {
            window = new Window();
            window.width = 200;
            window.height = 300;
            window.open(true);
            window.showStatusBar = false;
        }
    }
    ]]>
    </mx:Script>
</mx:Application>

```

Thanks in advance
