3 Replies Latest reply on Jun 18, 2009 1:04 PM by Michael Borbor

    ExternalInterface equivalent in AIR


      Ok, I know that ExternalInterface doesn't work in AIR according to the documentation, but is there something equivalent?  I have this nice little method I use in Flex to find the base URL where my app is deployed and I was wondering how to mimic this kind of behavior in AIR.



      public static function getBaseURL():String {

           var path:String = ExternalInterface.call("window.location.href.toString");

            var elem:Array = path.split('/');  

            var location:String = elem[2];  

            return "http://" + location;