0

I currently have a grid of sprites that contain bitmap data (photographs) as children of a container sprite. I'm using this tweener library to move the container sprite to centre an image. My issue is that at the end of the animation it jerks a little. This only happens the first time you move to an image, the second time it's very smooth. I was wondering if anyone has had this problem before or if it's a buffer problem is there a way to force everything into the flash buffer? It's not dynamically loading the images before animating them, they're all loaded at the beginning.

Any help is greatly appreciated!

4

2 回答 2

1

根据您提供的少量信息,我所能推断的是位图数据第二次被缓存并且不需要从内存中加载它。在这种情况下,cacheAsBitmap属性肯定会有所帮助。

此外,如果是上述情况,Blitting 是最好的方法。在此处了解有关 blitting 的更多信息。

于 2011-03-11T07:32:50.803 回答
1

不看代码很难说,但我会研究两件事:

  1. 使用补间库的延迟功能或计时器延迟第一个动画。可能有一些东西与第一次动画同时执行,这是查看是否是这种情况的快速方法。

  2. 查看容器精灵的.cacheAsBitmap属性。无论精灵的(位图)内容如何,​​此设置仍然可以影响精灵的移动/动画方式。Tween 库可以在后台设置此属性。尝试在动画之前将其显式设置为 true 或 false。

祝你好运

于 2011-03-11T01:36:34.967 回答