Animate images by varying opacity
Posted: Tue Oct 17, 2017 10:46 pm
Hello!
I've been trying to animate some images in a particular way by overlapping them and varying each image's opacity but with no success.
I've looked for a library or a code snippet that could do that but with no luck...
I have no problem controlling each image's opacity, I just can't figure out how I should implement the "varying opacity" part I want.
Let's say that I want to animate 4 images:
If any of you have every done something similar before or have an idea of how to do that, I'm all ears!
Thanks
I've been trying to animate some images in a particular way by overlapping them and varying each image's opacity but with no success.
I've looked for a library or a code snippet that could do that but with no luck...
I have no problem controlling each image's opacity, I just can't figure out how I should implement the "varying opacity" part I want.
Let's say that I want to animate 4 images:
- All images are drawn with an opacity of 0
- Image1's opacity tweens to 128
- At the moment Image1's opacity reachs 128, Image2's opacity tweens to 128
- At the moment Image2's opacity reachs 128, Image1's opacity tweens to 0 and Image3's opacity tweens to 128
- At the moment Image3's opacity reachs 128, Image2's opacity tweens to 0 and Image4's opacity tweens to 128
- At the moment Image4's opacity reachs 128, Image3's opacity tweens to 0 and Image1's opacity tweens to 128
- And so on...
If any of you have every done something similar before or have an idea of how to do that, I'm all ears!
Thanks