Flex3のSprite

by yoshida_surf
♥0 | Line 24 | Modified 2010-07-02 16:01:36 | MIT License
play

ActionScript3 source code

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

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="500" height="500" creationComplete="init()">
    
    <mx:Script>
        <![CDATA[
            import mx.core.UIComponent;
            
            
            private function init():void{
                var UIC:UIComponent = new UIComponent();
                this.addChild(UIC);
                
                var s1:Sprite = new Sprite();
                s1.graphics.beginFill(0xff0000);
                s1.graphics.lineStyle(1, 0x000000);
                s1.graphics.drawRect(0, 0, 300, 300);
                s1.graphics.endFill();
                UIC.addChild(s1);
                
                var s2:Sprite = new Sprite();
                s2.graphics.beginFill(0xffff00);
                s2.graphics.lineStyle(1, 0x000000);
                s2.graphics.drawRect(180, 180, 280, 280);
                s2.graphics.endFill();
                UIC.addChild(s2);
            }

            
        ]]>
    </mx:Script>
    
</mx:Application>

Forked