If left-arrow-key is down and up-arrow-key is down, there are two events that are both executed, because the conditions are true.
so every tick the computer is told to start animation for left and animation for up, in effect showing the first frame of animation every tick.
To solve this you have to make sure only one of the two events is true.
This can be done by adding extra conditions like the ones
nimos100 shows in his post.