开发者

Certain Flash movie doesn't works properly if added from another domain

I'm using the method described in the link (http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash) to implement a crossbrowser tracking with flash. Everything is working fine when all pieces are together in the same server, but for deploy, i really need to add the swf from our central server, to another different one. Just to simplify this is my html in domain2.com:

<html>  
  <head>
    <script src="http://dom1/control_cookie.js" type="application/javascript"></script>
    <script type="text/javascript">
      function flash_ready() {
        alert('begin!');
        CB_Cookie.init('CBCookie');
        CB_Cookie.set('cookie_name','value');
        alert(CB_Cookie.get('cookie_name'));
      };
    </script>
  </head>

  <body>
    <object id="CBCookie">
      <param name="allowScriptAccess" val开发者_运维知识库ue="always" />
      <param name="movie" value="http://dom1/CB_Cookie.swf" />
      <embed src="http://dom1/CB_Cookie.swf" name="CBCookie" allowScriptAccess="always" type="application/x-shockwave-flash"/>
    </object>
  </body>
</html>

function flash_ready is called from the swf itself, so, seems to be added correctly, because I can see the first alert. However, It stops execution of the function in CB_Cookie.init('CBCookie');

I also have a crossdomain.xml in the dom1 root, but it's no working anyhow...

Any ideas or known alternatives to do this between domains? Thank you in advance!


Duplicated. Sorry I didn't find it before.

Are Cross Domain Flash Local Shared Objects (LSO aka Flash Cookie) possible (stackoverflow)

And the solution is in the link below:

http://magp.ie/2010/10/15/javascript-library-to-manage-flash-local-stored-objects/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜