How to change a sprite at run-time?

I have looked around and I can’t find anything about this. I use javascript and I simply can not get it to work.
I would like to grab a sprite from the resources folder, and use it to replace the sprite of the player.
Thanks in advance! :smiley:

It might work if u initialy load it in your script than change the targeted object texture with the one u want and loaded.