Tutorial time: playing gifs in studio

Title is a little bit misleading, you can’t play gifs in studio. Good bye. Just kidding. Here are the steps:

  1. Convert the gif to a png sequence (or jpg if there is no transparency).
  2. Use this symbol (9.1 KB) and drag all the pngs to it.
  3. Assign the images to the planes. The symbol supports up to 98 frames out of the box. I don’t think you will ever need to increase this.
  4. Delete the frames you won’t use.
  5. You are done. Use symbol.controllers.gif.elements.animation.play(); to play the gif.

The gif changes frames every 100ms. If you need it to change every 200ms, call play(1/2), if it’s every 300ms, call play(1/3), etc.

5 Likes

Hi,
Thanks for the info, i’ve followed your instructions but hit a snag at the last stage. I get the following error in the code (see screenshot) despite renaming the symbol ‘gif’.

Can any one tell me where I’ve gone wrong?

Thanks,
Roger