Sprite 換圖

請問如何在sprite 換圖,試了很多方法,也不行 :cry:

properties: {

 arrow: cc.Sprite,
}

onLoad: function () {
   var image2 = cc.url.raw("resources/Texture/arrow3.png");
           var texture2 = cc.textureCache.addImage(image2); 
                  this.arrow.spriteFrame = new cc.SpriteFrame(texture2);


}

应该是需要先动态加载图片资源,然后再进行替换。参考文档:
http://www.cocos.com/docs/creator/scripting/load-assets.html#-asset

thank you so much!!! finally succeed .

 var image3 = cc.url.raw("Texture/arrow3.png");
          var texture3 = cc.textureCache.addImage(image3); 
          this.arrow.spriteFrame.setTexture(texture3);

then i got a error message “Texture/arrow2.png” because it is not placed in the “resources” folder."

just copy the image file to /Users/username/project name/jsb-default/res/raw-assets.

請問有 typescript的寫法嗎? 感恩