How to play a symbol from within javascript?

Problem: Hello, I`d like tom start the (independent) timeline of a symbol in a scene from javascript. How can I do this?

Saola Animate version: 2.6.0

OS: Windows 10

Notes: I can’t figure out how where the timeline object in the DOM is located. Thanks!

Hi Martin,

To play a timeline in the current scene of a symbol, you can use the script below:

  // get symbol document from main document and name of symbol element
  // the symbol document has the same API as the main document
  var symbolDoc = doc.getElement('symbol element name').getSymbolDoc();
  // start a timeline in the symbol
  symbolDoc.getTimeline('timeline name').start();


1 Like

Hello and thanks a lot.

Works great! Now the function GetSymbolDoc() is not documented in the help file. Is there any chance to have an up to date documentation or is there any other chance to get known which functions are available? Thank you very much!

Hi Martin,

To make it easy for JavaScript novices, the help file only mentions common functions.
We may document some more ones in future updates.
Please ask whenever using only documented functions doesn’t help.


Hello and thanks a lot. Actually it would be better even for novices to have the available functions documented, otherwise they - like me - try for hours to find solutions for something already available but undocumented. I tried about two hours, then waiting half a day for your answer at the forum until being able to go further with my work.

Thus I really suggest to put into the manual everything that helps going on with your software. I’d be happy as a Saola-novice…