can actionscript retrieve navigator.userAgent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitchawla
    New Member
    • Jul 2007
    • 85

    #1

    can actionscript retrieve navigator.userAgent

    can we get the navigator.userA gent string from actionscript just like in javascript
  • rohitchawla
    New Member
    • Jul 2007
    • 85

    #2
    i have embedded the flash file in an html page and when a user opens that page, can we retrieve his browsers userAgent string from actionscript

    Comment

    • rsdev
      New Member
      • Jul 2007
      • 149

      #3
      Originally posted by rohitchawla
      i have embedded the flash file in an html page and when a user opens that page, can we retrieve his browsers userAgent string from actionscript
      Try this;

      import com.macromedia. javascript.*;

      var proxy:JavaScrip tProxy = new JavaScriptProxy (_root.lcId, this);

      function getBrowserInfo( ):Void
      {
      proxy.call("get BrowserInfo");
      }

      function getBrowserInfoR eturn(browser:O bject):Void
      {
      //can get more info from System.capabili ties
      for(var x:String in browser)
      {
      trace(x + " : " + browser[x]);
      }
      }

      getBrowserInfo( );

      And check here for implementation.

      Comment

      Working...