Actionscript 2 large tile-based maps creating lag

江枫思渺然 提交于 2019-12-01 23:44:54

If only a small portion of the large map is visible at a time, I would only create the child movieclip tiles for tiles that are currently visible, and then add/remove them as the viewport moves around.

On the other hand, if you're displaying the whole thing at once, you'll probably need to graphically copy all of the tiles onto a single large movieclip using the BitmapData class. Then you can remove the movieclip tiles so that Flash only has to scroll one large movieclip.

Depending on what your tiles are, you can also experiment with setting cacheAsBitmap to true along with assigning opaqueBackground on all the movieclips involved.

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