there is a bug in the textureCache.addImage function where the application will hang in Android if you call this method twice to load two images remotely
example:
cc.textureCache.addImage("http://www.cocos2d-x.org/attachments/download/1508", function(texture) {
if (texture instanceof cc.Texture2D) {
cc.log("Remote texture loaded: " +texture);
var sprite = new cc.Sprite(texture);
sprite.x = cc.winSize.width/2;
sprite.y = cc.winSize.height/2;
me.addChild(sprite);
}
else {
cc.log("Fail to load remote texture");
}
});
cc.textureCache.addImage("http://www.cocos2d-x.org/attachments/download/1508", function(texture) {
if (texture instanceof cc.Texture2D) {
cc.log("Remote texture loaded: " + texture);
var sprite = new cc.Sprite(texture);
sprite.x = cc.winSize.width/2;
sprite.y = cc.winSize.height/2;
me.addChild(sprite);
}
else {
cc.log("Fail to load remote texture");
}
});