Well it works for me… are there any errors in the console?
Neither of these methods take any arguments though, it’s just .stop() and .play(). Also in my above snippet I assigned the animation to an animation variable, whereas in your code it’s called anim – the name of the variable doesn’t matter, but you’ll have to adjust it either way.
That won’t work at all, you’ll have to call those methods on the animation instance as shown above.
BTW, please format your code snippets for better readability – you can do so by selecting it and clicking the </> icon.