forked from: mxml helloworld

by yarhalla1 forked from mxml helloworld (diff: 16)
♥0 | Line 24 | Modified 2012-05-03 14:15:33 | MIT License
play

ActionScript3 source code

/**
 * Copyright yarhalla1 ( http://wonderfl.net/user/yarhalla1 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6ZqS
 */

<?xml version="1.0" encoding="utf-8"?>
<!-- forked from yarhalla1's mxml helloworld -->
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Button id="myButton" label="Hello World!" click="onClick();"/>
    <mx:Label text="Hello, World!" />
    
    <mx:Script>
         <![CDATA[  
        import mx.containers.TitleWindow;
        import mx.managers.PopUpManager;
        import mx.controls.Button;
        
        private function onClick():void {  
                var dialog = new TitleWindow();
                dialog.title = "This is dialog";
                dialog.width = 300;
                dialog.height = 200;
                
                var myButton = new Button();
                dialog.addChild(myButton);
                

                
                PopUpManager.addPopUp(dialog, this, true);
                PopUpManager.centerPopUp( dialog );
         }  
         ]]>
    </mx:Script>

</mx:Application>