'repeatCount' attribute not working. (Solved) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

'repeatCount' attribute not working. (Solved)

Is there any way that the moving ball process will repeat again and again? (Code added below) I already used the indefinite value in the repeatCount attribute. Doesn’t work. https://code.sololearn.com/W529HEXCKk99/?ref=app

26th Jul 2021, 2:10 AM
Md. Amanat Alam
Md. Amanat Alam - avatar
2 Answers
+ 3
Are you trying to make the ball animations to bee in a loop? If so, try replacing your animation cycle with this: <animate id="anim1" attributeName="cy" values="230;50" begin="0s; anim8.end" dur="1s" fill="remove" repeatCount="1"></animate> <animate id="anim2" attributeName="cx" values="360;190" begin="0s; anim8.end" dur="1s" fill="remove" repeatCount="1"></animate> <animate id="anim3" attributeName="cy" values="50;230" begin="anim2.end" dur="1.5s" fill="remove" repeatCount="1"></animate> <animate id="anim4" attributeName="cx" values="190;14" begin="anim2.end" dur="1.5s" fill="remove" repeatCount="1"></animate> <animate id="anim5" attributeName="cy" values="230;430" begin="anim3.end" dur="2s" fill="remove" repeatCount="1"></animate> <animate id="anim6" attributeName="cx" values="14;190;" begin="anim3.end" dur="2s" fill="remove" repeatCount="1"></animate> <animate id="anim7" attributeName="cy" values="430;430" begin="; anim5.end" dur="2.5s" fill="freeze" repeatCount="1"></animate> <animate id="anim8" attributeName="cx" values="190;357" begin="; anim5.end" dur="2.5s" fill="freeze" repeatCount="1"></animate> So animation with id="anim1" will restart once "anim8" has finished
26th Jul 2021, 3:16 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Aleksei Radchenkov Thanks a ton man! It helped me a lot. Learned something new today. I really appreciate it. Here is the updated code: https://code.sololearn.com/W529HEXCKk99/?ref=app
26th Jul 2021, 4:34 AM
Md. Amanat Alam
Md. Amanat Alam - avatar