Jazcash Posted August 30, 2017 Share Posted August 30, 2017 I'm trying to work how to display a shine animation on one of my sprites. I have the shine as an image (with transparency in the image), and I just want to drag it over my sprite whilst staying masked inside the sprite shape itself. I can sort of work out how to get the shine to appear masked inside the image, but it includes a copy of the whole sprite in the final BitmapData instance, whereas I just want the shine, but masked by the sprite's shape. I could paste my code, which is using some hacky-feeling processPixelRGB calls, but would appreciate a full explanation of how to do it a more optimal way. Link to comment Share on other sites More sharing options...
samme Posted August 30, 2017 Share Posted August 30, 2017 I think there's way with BitmapData#alphaMask. You'll have to extract/create a bitmap mask from the target sprite as well. Link to comment Share on other sites More sharing options...
samme Posted August 31, 2017 Share Posted August 31, 2017 Link to comment Share on other sites More sharing options...
Recommended Posts