0 Replies Latest reply on Mar 8, 2010 8:33 PM by norvinet

    How do I add a Cookie to html control


      I want to add a cookie to an html control in my application before any page is loaded within the control.


      Im trying to do it like this.


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"


         private function init():void {
          html.htmlLoader.manageCookies = true;
          html.htmlLoader.userAgent = "Custom User Agent";
          html.htmlLoader.window.document.cookie = "cookieKey=CookieValue; path=/";


      <mx:HTML id="html" />



      If i set the location of the html control then the custom userAgent works, but the cookie doesn't.


      Any ideas,

      Thanks in advance.