FSCommand /getURL 重复使用 bug

来源:互联网 发布:mac怎么安装flash插件 编辑:程序博客网 时间:2024/04/30 00:01

写念佛机的时候,在同一帧连续用到了两个FSCommand ,就跟下面的一回事:

 

onUnload = function(){

fscommand("ulist");

 

fscommand("uole");

}

 

结果在VB里面试试老是漏掉一个command,测试一下:

 

 

输出uole,没了?没了!看来好像不是我的错。

 

最后在网上找到了相关文章:http://www.northcode.com/blog.php/2007/09/11/FSCommand-and-getURL-Bug-in-Flash-Player-9

 

 

我晓得了~只有Flash player 9才有这问题,而我用CS3发布的最新版就它,既然说:

 

Each call is added to an associative array (also called a map) based on the value of its argument (not the command name or the URL). If the argument does't exist in the map it's added to the end, which preserves the order of execution. So far no problem, until we encounter two commands with the exact same argument string. In this case, the call already in the map is replaced by the new one being added instead of just being added to the end of the map. The order of execution has now been changed and one calls has been blown away. The more calls you make, the more confusing the results will seem.

就只好改改看:

 

onUnload = function(){

fscommand("ulist","-");

 

fscommand("uole");

}

 

得行咯。