Skip to main content
Known Participant
January 22, 2020
Question

Apply a darken-gradient to Bitmap image with AS3

  • January 22, 2020
  • 1 reply
  • 383 views

I'd like to add a gradient to a .png image (so that one side of the image is darker then the other).

 

Does anyone know how I might go about this?

 

Thanks in advance.

This topic has been closed for replies.

1 reply

Legend
January 22, 2020

Just draw a same-sized rectangle over it with an alpha gradient fill.

Known Participant
January 22, 2020

But in the case of .pngs I don't want the shadow to show over the transparent areas.

Legend
January 23, 2020

Should have mentioned that in the first post. Time for you to learn Pixel Bender then and create a shader.