kd emp Is it a bug?
Posts 15
Added by kd emp 12 months ago

TMXTiledMap:
情况描述:地图显示错误,所有地图中图块均显示为原始图片(附件三)的第一个切片(正确:附件二;错误:附件一))

情形一:从main场景切换到地图场景,有时显示正确,有时显示错误。
情形二:再从地图场景切换到menu场景,再从menu场景切换到地图场景,显示正确

浏览器:Chrome v19

QQ截图20120606100540.png - wrong (52.4 kB)

QQ截图20120606100612.png (101.6 kB)

map.png (7.8 kB)

Shengxiang Chen RE: Is it a bug?
Posts 9
Added by Shengxiang Chen 12 months ago

The first is,that all image resources has been loaded.
you could pre-load image resources before drawing.

example:
var g_ressources = [ {type:"image", src:"map.png"}

]

Second,if the problem doesn't get fixed,post the TileMap file and code snippets pls .:P

kd emp RE: Is it a bug?
Posts 15
Added by kd emp 12 months ago

I preload the image, it seems that kind of error does not appear anymore. so far so good, Thanks!

Shengxiang Chen RE: Is it a bug?
Posts 9
Added by Shengxiang Chen 12 months ago

my pleasure:)


(1-3/3)