我们如何在flex中识别用户的Web浏览器?基于浏览器,我必须在我的flex应用程序中显示一些文本。
任何帮助都将不胜感激。
由于
答案 0 :(得分:0)
简短的回答是使用ExternalInterface来调用JavaScript代码。
我将从文档中查看这些页面以获取更多深入信息:
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
答案 1 :(得分:0)
是的,Javascript代码可让您访问Navigator对象,该对象可以为您提供浏览器详细信息。
这是我在Googling上获得的一个例子
http://www.tharas.in/2009/12/getting-client-browser-environment-in-flex/
答案 2 :(得分:0)
来自ActionScript,
var result:String = ExternalInterface.call("eval", "navigator.userAgent");
获取浏览器名称的值,将其存储在结果中。