Actionscript Error #2044: Unhandled SecurityErrorEvent:. text=Error #2047: Security sandbox violation: LocalConnection.send: 127.0.0.1 cannot access

点点圈 提交于 2019-11-28 09:48:08

问题


When running flash components that use localConnection within an HTML container, I get the following error in a popup box (flash player is the debug version):

Error #2044: Unhandled SecurityErrorEvent:. text=Error #2047: Security sandbox violation: LocalConnection.send: 127.0.0.1 cannot access


回答1:


Changing the page's URL from http://127.0.0.1/ to http://localhost/ solved the problem.




回答2:


// add this line after the instanciation aof the receiver file

receiveSwf_lc.allowDomain("localhost");

// or whatever domain you like, use * as wildcard to allow any domain name




回答3:


also you might want to add a crossdomain.xml file, but here is the decent explaination: http://scottrockers.com/blog/resources/flash-information/workaround-solution-to-flash-error-2044-unhandled-securityerror-and-error-2048-security-sandbox-violation




回答4:


You can add a hosts file entry and point it to 127.0.0.1 as well.



来源:https://stackoverflow.com/questions/477904/actionscript-error-2044-unhandled-securityerrorevent-text-error-2047-secur

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!