url

by jozefchutka
♥0 | Line 18 | Modified 2011-01-03 21:38:45 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    import flash.net.*;
    import flash.text.TextField;
    import flash.external.*;
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var lc:LocalConnection = new LocalConnection();
            
            var tf:TextField = new TextField();
            tf.width = stage.stageWidth;
            tf.height = stage.stageHeight;
            tf.text = "";
            addChild(tf);
            
            tf.appendText(lc.domain + "\n");
            tf.appendText(stage.loaderInfo.url + "\n");
            //tf.appendText(ExternalInterface.call("return window.location"))
        }
    }
}