I was using this code in cocos 1.9 version but I does not work new version of cocos creator.
var ballTexture = cc.textureCache.addImage(cc.url.raw(“Texture/balls/ball1.png”));
this.ball.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(ballTexture);
I have seen the update guide but I cannot solve this problem.