tags:

views:

26

answers:

3

Hi,

How do we identify the user's web browser in flex ? Based on the browser I have to display some text in my flex application.

Any help would be appreciated.

Thanks

A: 

Short answer is to use ExternalInterface to call JavaScript code.

I would take a look at these pages from the documentation for more in depth information:

http://livedocs.adobe.com/flex/3/html/help.html?content=18_Client_System_Environment_7.html http://livedocs.adobe.com/flex/3/html/19_External_Interface_04.html http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html

www.Flextras.com
A: 

Yes, Javascript code gives you access to Navigator object, which inturn can give you the browser details.

Here's an example I obtained on Googling

http://www.tharas.in/2009/12/getting-client-browser-environment-in-flex/

Icarus
A: 

From ActionScript,

var result:String = ExternalInterface.call("eval", "navigator.userAgent");

which gets the value for the browser name, stores it in result.

adamcodes