Reset timeSincePress When Students Modify a Graph?

I am working on a linked motion animation and graph. The animation is controlled by an action button using “timeSincePress.”. The CL documentation says timeSincePress “resets to zero if the “reset” link is pressed, or if a component on the same page is focused or edited.”

The reset button works, but I am not seeing what I want to see when students edit the graph. When students move the draggable point on the end of the graoh, I would like timeSincePress to return to 0 and the button to reset (now it is distracting that the linked character moves around when students are dragging the endpoint). I suspect there is an easy workaround, but I’m not seeing it now. Thanks!

https://teacher.desmos.com/activitybuilder/custom/5e46c87670a6b80cf46a74cd

Try using the resetOnChange sink in the action button component. I forgot this existed until I did a search and found one of my own activities posted on here!

resetOnChange: "${graph1.number("a_2")}, ${graph1.number("b_2")}"
1 Like