Jump to content

Load and change texture while game is running


Recommended Posts

Hi there,

I guess I´m missing something, I don´t know how to change the texture to a sprite if I need to load it... Ok, so I have a sprite with a texture, and then I have like 400 images (not preloaded) and I need to change the texture of that sprite with one of those not preloaded images, how can I do that?


I tried with this.game.load.image("newTexture", path)




this.imagenZapa.loadTexture("newTexture"); but is giving me an error because is not in the cache.


How can I fix that, I´m pretty sure there´s a super-basic-way to do it but it seems that my brain is like Intenert Explorer today...

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...