官网没有具体例子,只有看api,研究成果如下
var that = this; var url = "http://xxxxxx"; cc.loader.loadImg(url,null,function(err,img){ var logo = new cc.Sprite(img); that.addChild(logo); logo.x = size.width / 2; logo.y = size.height / 2; });