Reset click animation?

How can I have this reset to 0 (unshaded) on a button.pressCount?
image

There might be a more efficient way of doing it, but as a quick measure you could create b_p1 which is set to button.pressCount, and b_p2 which is initially set to 0. Then have a ticker action running at 0ms such as:

{b_p1>b_p2: (s_haded->0, b_p2->b_p1)}

Might it just be easier to create as reset “button” as a clickable polygon on the graph itself, with action s_haded->0?

“Might it just be easier to create as reset “button” as a clickable polygon on the graph itself, with action s_haded->0 ?”
That wouldn’t reset to unshaded when I used RNG for new lines though, would it?

I have no idea what you mean by that. Can you share your activity or describe exactly what you’re intending to achieve?

Here’s a way of using a single action function and a list of the polygons to shade and unshade. You could also have a “Reset” polygon that only sets s_haded->0: Graphing Calculator

1 Like