You could try and add instance variables to the walker, so the set animation doesnt get set every loop.
like, add instance boolean variables: walking = true, and attacking = false
set them accordingly, like, in the first sub, once its walking, set the variable walking to true.
to the distance check, add a check for the boolean is walking, and invert it.
Now, when its bigger then 200, and boolean is walking = false, it will set the animation to walking and the boolean to true.
Do the same principal for the attacking.
In short: by means of boolean sets and checks, prevent the spriter animation from being set every loop.