flash on 2014-10-14

by tepe
♥0 | Line 19 | Modified 2014-10-14 07:38:29 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        private var fn:Function;
        public function FlashTest() {
            // write as3 code here..
            fn = function func1():void{
                var s:Sprite = new Sprite();
                s.graphics.beginFill(0xff0000);
                s.graphics.drawCircle(0,0,10);
                s.graphics.endFill();
                stage.addChild(s);
                s.x = 100;
                s.y = 100;
            }
            fn();
            fn = null;
            

        }
    }
}