Apply a darken-gradient to Bitmap image with AS3

Community Beginner ,
Jan 22, 2020

Copy link to clipboard

Copied

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.

TOPICS
ActionScript, How to

Views

68

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 22, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jan 22, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 23, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
coldscooter1 AUTHOR LATEST
Community Beginner ,
Jan 23, 2020

Copy link to clipboard

Copied

I'll take a look into that. Thanks for the reply.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more