+ 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
2 odpowiedzi
+ 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
+ 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