Error 2000 in flash

天大地大妈咪最大 提交于 2019-12-31 05:38:06

问题


Sometimes(I can't give exact classification of the situation) Error #2000 is thrown by flash player. I suppose it's caused by working with external swf(sqiglly spell checking library) via local connection.

Have you any idea how can I fix the bug?

thank you in advance!


回答1:


Without the actual code, one has about 3 or 4 different reasons for Error #2000. Most of the times it is because the security policy was not set properly or was not received in time.

  1. If it is not the external swf it could be that some of your assets are not present in your debug folder.
  2. A next issue to check would be if there is enough time for the context to be set up,

    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("myExternalMovie.swf");
    myLoader.load(url);

    // Notice it is not the following
    myLoader.load(new URLRequest("myExternalMovie.swf"));

  3. Full url references seem to work better than relative.

  4. I don't recommend this last one but you can try suppressing the error with adding a event listener to contentLoaderInfo for the actual Security Event.



回答2:


You can try -use-network=false in Compiler settings AND embed any external files you are acessing such as xml or css. ALSO is any in any child swfs you are loading into your main swf, they should do the same if they in turn load external assets.



来源:https://stackoverflow.com/questions/5754270/error-2000-in-flash

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