I'd like to know what Browser the User is using to view my Flex application. How can I get at the User Agent string and other information?
you can 'embed' your javascript inside AS3 code like this :
var v : String = ExternalInterface.call("function(){return navigator.appVersion+'-'+navigator.appName;}");
var t : TextField = new TextField();
t.autoSize = TextFieldAutoSize.LEFT;
addChild(t);
t.text = v;
the textField will display infos about the navigator like this (chrome):
5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19-Netscape
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With