码迷,mamicode.com
首页 > 数据库 > 详细

Fix for: Permission denied to access property 'toString'

时间:2014-12-23 18:53:29      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

Originally posted by rwolffgang here.

Hi guys,
when developing a game that runs in an iframe (Facebook canvas) I encountered this error message in the JavaScript console:

Permission denied to access property ‘toString‘

I‘m using the Flash plugin and it turned out to be a security mechanism of Flash, which disallows to pull content from another domain. Although the Flash plugin and MP3s are hosted on the same domain, the iframe let‘s Flash consider it as a cross-domain access. The domain, from which the content should be downloaded, needs to allow the access.

To solve this issue I had to place a crossdomain.xml file in the root of our domain.

<cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" />
    <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
I know this is not an error report, but I‘m certain someone else will hit the same problem, hence I want this knowledge to be shared.

Cheers,
Robert

Sources:

http://willperone.net/Code/as3error.php

https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

 

from: http://community.createjs.com/discussions/soundjs/136-fix-for-permission-denied-to-access-property-tostring

 

Fix for: Permission denied to access property 'toString'

标签:

原文地址:http://www.cnblogs.com/argb/p/4180461.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!