How to make dynamic diagrams with special effects on UI?

I used flipbook in the material for the sequence diagram to make a dynamic effect, to put in the UI above as long as the bottom picture is not black he will turn white, how to solve?