Say I have this insect SVG. Unless otherwise possible, I want to insert it in the tags <img />or <object />.
Insect.svg now has two animations: one for walking and one for flying.
I would like to start / stop these animations, individually and from the JavaScript HTML code (or else call the built-in SVG JS function to βwalkβ or βflyβ from the JavaScript HTML code).
So, in the end, if during the gameplay I want my insect to fly, I can just tell him about it with JS and tell him to stop when he should no longer fly. The same thing with walking.
Is there any way to do this? I have been to Googling for the last hour and have not made any real results. I do not need IE support if this is a problem.
Thank you for your time!
source
share