Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple Separate Sprite Animations

Hey, so I have very minimal coding knowledge and am trying to put together a specific watch face for myself out of sheer determination. I am almost done but I can't seem to figure out what code I need to run 2 separate sprite animations at the same time.

 

I have one up and running using the information from https://dev.fitbit.com/build/guides/user-interface/svg-components/other/#sprite-image

 

I just can't seem to figure out how to reference a 2nd file correctly and have it animate. (No clicking, no alternating, just both running at once.) I'm sure I'm simply missing something obvious, so any help would be greatly appreciated!

 

Thanks

Best Answer
0 Votes
2 REPLIES 2

I think it should suffice to call .animate on the second element (passing the relevant event type). That assumes you've got the second animation set up correctly in .gui/.defs/.css.

 

In some cases, you can trigger multiple animations with a single call to .animate (eg, child elements responding to the same event trigger). Whether this suits you depends on the structure of your SVG.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

I ended up catching that I missed re-naming my 2nd elementID, got it updated and I'm up and running now! Thanks for the help!

Best Answer