解决Flash应用中的”Uncaught exception: Permission denied to call method to Location.toString”问题

可能有些人已经遇到了这个问题,执行Flash应用时会出现”Uncaught exception: Permission denied to call method to Location.toString”这种很奇怪的错误,不过在你的电脑上出现了,但是很有可能在你同事的电脑上却总是可以正常运行……

其实这是由于Flash 9.0.115.0和Flash9.0.124.0版本中跨域(crossdomain)的security方针的改变引起的。修改这个问题并不复杂,只需要将crossdomain.xml文件中原先的:


  
   

修改为


   
   
   

就OK了。从Adobe’s TechNote page on arbitrary headers not being sent这里可以看到更加具体的说明。