Wierd flickering animation

I made a Animator with a smooth image translation animation (named “in”) and out is just the reverse of in. Through code I set FadeIn value to true and false whenever necessary. But now when I click on the button to start in Animation the animation flickers for a moment and then starts over.
The video for this flickering is on

For those who have the same problem I had. I solved it really quickly just after posting this question. All I had to to was to completely minimise the transition duration to 0 and that worked like magic. Nothing except that had to be changed and it got rid of that flickering thing.