Jump to content

Replace colors in sprite


rcpinto
 Share

Recommended Posts

Hi,

I need to replace the colors of a sprite during the game. More precisely, I need to swap specific colors with others (e.g., swap blue with red). I know that there is a method in BitmapData that does exactly what I need (replaceRGB). But I need to apply it to a sprite. Is it possible? Maybe if I could access the sprite's bitmapdata, I could do that. I know it is possible to replace colors using shaders, but I want to know if it is possible without shaders first.

Thanks!

Link to comment
Share on other sites

Thanks guys, but all examples in these pages assume you have access to bitmapdata independently of a sprite (at most, the sprite is created from bitmapdata, then, of course, you have the original bmd). Can I assume then that you can't extract the bmd from a sprite, and this is indeed the only way? (to create the sprite from bmd and keep the bmd)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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