AS2:实例名称长度影响命中测试?
我一次对数千个 MC 进行 hitTest,它们具有相对较大的数字名称(9 个数字),现在我将这些数字用于其他用途,但我想知道是否找到了不同的解决方案,这可能会释放大量闪存?
针对较短的实例名称进行 hitTesting(考虑到我同时对这些 MovieClip 中的近 3000 个进行 hitTested)会导致性能发生明显变化吗?
I run a hitTest against thousands of MCs at a time, they have relatively large number names (9 figure), right now I use these numbers for something else but I was wondering if I found a different solution could this possibly free up much flash memory?
Would hitTesting against shorter instance names (considering I have almost 3000 of these MovieClips being hitTested at once) would it cause a visible change in performance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
变量名称的长度不会影响代码的性能。
考虑重写代码的其他方面:如循环等......
查看这些:actionscript 3 optimizations by joa ebert
length of variable names does not affect the performance of your code.
think about rewriting other aspects of your code: like loops etc ...
check these out: actionscript 3 optimizations by joa ebert