Security.showSettings

by wh0
I wasted like an hour making this.
♥0 | Line 65 | Modified 2011-06-09 13:04:38 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextFormat;
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.system.SecurityPanel;
    import flash.system.Security;
    public class FlashTest extends Sprite {
        
        private static var small:TextFormat = new TextFormat('_sans', 10);
        
        public function FlashTest() {
            Wonderfl.disable_capture();
            Security.showSettings(SecurityPanel.PRIVACY);
            addEventListener(Event.ENTER_FRAME, test);
            graphics.beginFill(0xffffff);
            graphics.drawRect(134, 211, 150, 13);
            var tf:TextField = new TextField();
            tf.defaultTextFormat = small;
            tf.text = 'most embarrassing secrets?';
            tf.width = 150;
            tf.height = 20;
            tf.x = 134;
            tf.y = 208;
            tf.selectable = false;
            addChild(tf);
            graphics.drawRect(160, 235, 80, 15);
            tf = new TextField();
            tf.defaultTextFormat = small;
            tf.text = 'Deny';
            tf.width = 80;
            tf.height = 20;
            tf.x = 160;
            tf.y = 235;
            tf.selectable = false;
            addChild(tf);
            graphics.drawRect(265, 235, 50, 15);
            tf = new TextField();
            tf.defaultTextFormat = small;
            tf.text = 'Allow';
            tf.width = 50;
            tf.height = 20;
            tf.x = 265;
            tf.y = 235;
            tf.selectable = false;
            addChild(tf);
            graphics.drawRect(147, 237, 13, 12);
            graphics.drawRect(253, 237, 12, 12);
            graphics.beginFill(0xff0000);
            graphics.drawCircle(153.5, 242.5, 6);
            graphics.beginFill(0x008000);
            graphics.drawCircle(259.5, 242.5, 6);
            graphics.endFill();
            graphics.lineStyle(2, 0xffffff);
            graphics.moveTo(150, 242.5);
            graphics.lineTo(157, 242.5);
            graphics.moveTo(257, 243);
            graphics.lineTo(259, 245);
            graphics.lineTo(262, 240);
        }
        
        private function test(e:Event):void {
            if (stage.numChildren == 1) return;
            stage.addChildAt(this, 1);
            removeEventListener(Event.ENTER_FRAME, test);
        }
        
    }
}