我正在尝试使用 Haxe 和 CreateJS (externs) 构建一个应用程序。我遇到了加载清单的问题。
这是代码:
function loadAssets():void
{
var _manifest:String = "assets/manifests/mymanifest.json";
_queue = new LoadQueue(true);
_queue.on("complete", onQueueComplete);
_queue.on("error", onQueueError);
_queue.loadManifest([_manifest]);
}
mymanifest.json 的内容:
{
"path" : "assets/images/main_menu/",
"manifest" :
[
{"id" : "mm_background", "src" : "background.jpg", "type":"Image"},
{"id" : "mm_adv_off", "src" : "advanSelectOff.jpg", "type":"Image"},
{"id" : "mm_adv_on", "src" : "advanSelectOver.jpg", "type":"Image"},
{"id" : "mm_tech_off", "src" : "techSelectOff.jpg", "type":"Image"},
{"id" : "mm_tech_on", "src" : "techSelectOver.jpg", "type":"Image"},
{"id" : "mm_app_off", "src" : "appSelectOff.jpg", "type":"Image"},
{"id" : "mm_app_on", "src" : "appSelectOver.jpg", "type":"Image"}
]
}
我注意到 mymanifest.json 被加载,但是没有图像被加载。
onQueueError
不会触发,所以我认为没有错字或格式错误...
我如何验证:
我在浏览器中查看控制台,并查看了网络负载...控制台没有显示错误跟踪或排序。网络不显示任何图像负载...