Action Button to Start and Stop animation

I’m trying to use an action button to start and stop an animation and I’ve gotten it to start the animation, but I can’t seem to get the cl right to stop it. The goal is for students to start the rocket traveling to the space station, then stop it as close to the space station as possible (either before or after). Here is the screen I’m working on: Rockets to Round . Any help you can provide is greatly appreciated.

Does it have to be an action button? Or are you ok using controls within the graph? If so, this example may help.

If you want it to be an action button, let me know.

I don’t know what the OP would prefer, but I have tended to avoid “custom-made” buttons like this in a graph, as they don’t look so good on different sized screens (e.g. phones, small tablets). One advantage with using standard components is that they tend to be designed to adapt to different screen layouts (also probably more likely to have accessibility capabilities).


It looks to me that you had an idea, but may have a minor error. You’ve defined a_0 in the graph CL as a lastValue, but the only button capture is “distance”. You may also want to conditionally define the time based on pressCount otherwise the timer (and animation) restarts.

I was hoping to use an action button/buttons to make this happen. Thanks.

Sure, here’s one approach. Let me know if this works for you or not.

1 Like

I think this will do great and I think I see what I was missing, now. Thank you for all your help!

1 Like