Start and stop oscillating animation

dbelavic shared this question 9 years ago
Answered

Hy,


In this applet https://www.geogebra.org/st...

I would like few things:

Control animation with button (button is scripting Check box, and animation goes only when check box is true) ... and it is OK.

But I would like that animation stop when slider is on beginning, and then again start with pressing button


I tried

scripting button (rot is slider) and slider (animacija is Chech box)


Button

rot=rot+0.01

animacija=!animacija


And in slider speed

If[animacija ∧ (rot > 0), 1, 0]


And it is not ok. Slider is going back and it is not going forward, and is on 0. And that means that animation stops.

Only if I hit button twice or three times it start going forward.

Is anyone have some better idea?


Here is ggb file.

https://ggbm.at/566993

Comments (3)

photo
1

Hi,


Button

animacija=true


And in slider speed

If[animacija , 1, 0]

are enough because the stop is made but the rot's update .

https://ggbm.at/566995

photo
1

Thanx it's so simple :)


But on button sould be

animacija=!animacija

so it can be controled any time.


Hi,


Button

animacija=true


And in slider speed

If[animacija , 1, 0]

are enough because the stop is made but the rot's update .

photo
1

And in slider speed

If[animacija , 1, 0]

animacija is all that is needed in speed.


Simon

https://ggbm.at/566999

© 2023 International GeoGebra Institute