I'm a Sydney-based Freelance Developer, click here to check out my work history.
Or, you can check out my open source code library here.
Categories: Code Thoughts
September 4, 2015 at 6:14 pm
So, how to write js function for start svg animation when I need?
Can I import swg in Edge Animate and control animation?
September 8, 2015 at 9:51 pm
Have a look of the page source of the example above to see how the SVG gets played via JS (it relies on jQuery).
To call this from Edge it’s as simple as including these JS functions in your HTML and call them from your Edge project.
The ‘attachSvg’ function loads the SVG into an element within the HTML. You can’t just use a <img> tag as the animation nodes don’t work unless they’re actually in your DOM (you could use an <object> tag if you didn’t need to control playback).
The ‘playSvg’ function then finds all of the animation nodes within the SVG and calls ‘beginElement’ on each of them.
Your email address will not be published.
© 2017 Thomas Byrne
Theme by Anders Noren — Up ↑