# Controlling template animation

**URL:** <https://discourse.nodered.org/t/controlling-template-animation/17608>\
**Category:** Dashboard\
**Created:** [6 November 2019 23:16 UTC](https://discourse.nodered.org/t/controlling-template-animation/17608 "2019-11-06T23:16:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azamj966](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Azamj966](https://discourse.nodered.org/u/Azamj966)\
**Post date:** [6 November 2019 23:16 UTC](https://discourse.nodered.org/t/controlling-template-animation/17608/1 "2019-11-06T23:16:25Z")

</div>

Hey Guys is there any way I can Pause resume and restart the animation from the beginning depending on the payload i receive from another function. I was able to either resume/ restart and pause/restart with the animation play state but not all three conditions pause/resume/restart.`

.moving {  
width: 25px;  
height: 25px;  
background: grey;  
border-radius: 10%;  
position: absolute;  
top: 44px;  
left: 0px;  
animation: move 5s infinite;  
animation-timing-function: linear;  
animation-play-state: {{msg.payload}};

}

@keyframes move {  
from{left:0px;}  
to{left:480px;}  
}

`
