flash on 2010-8-23

by kihon
♥0 | Line 21 | Modified 2010-08-23 04:26:09 | MIT License
play

ActionScript3 source code

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

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="application1_applicationCompleteHandler(event)">
    <fx:Script>
        <![CDATA[        
            import mx.core.UIComponent;
            import mx.events.FlexEvent;
 
            protected function application1_applicationCompleteHandler(event:FlexEvent):void
            {
                var container:UIComponent = new UIComponent();
                addElement(container);
 
                var canvas:Sprite = new Sprite();
                canvas.graphics.beginFill(0xED1A3D);
                canvas.graphics.drawRect(0, 0, 100, 100);
                canvas.graphics.endFill();
                container.addChild(canvas);
            }
        ]]>
    </fx:Script>
</s:Application>