Fix for: Permission denied to access property 'toString'

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.

    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*" />
    <allow-http-request-headers-from domain="*" headers="*"/>
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.






posted on 2014-12-23 16:52  argb  阅读(2256)  评论(0编辑  收藏  举报