Is there a way to fade an image?


#1

I have a student who wold like an image to fade away. Is there a way to do this?

Thank you,
Alison.


#2

@alison.james

Alison,

I am not sure if there is a direct way. I did not see a opacity property for images. For a quickish solution, I put a button over an image and then use a timed loop to change its opacity.
You can play here: https://studio.code.org/projects/applab/TfL3E5cFGmD2PUATQxN7VDuGHevcvP60T_DqD7Cj9K4

Happy computing,
Andrea


#3

Thank you, Andrea, that will be very helpful.