Access Saola Animate from outside


for our Project we need to be able to access the animation and control it.
Usually tasks would be: pause the animation, resume the animation, jump to a specific label within the timeline.

I would also like to know if there is any timeline event which tells me when the timeline reaches any label.

Background information: The Saola Animation is running inside of an IFRAME and the HTML page on the “outside” need to be able to control the animation.

Is there a way fulfill als the tasks?

edit: I figured out how to pause and resume the animation from the outside. but i really need some sort of listener for the timeline.

Hi Kondrillo,

The timeline doesn’t fire any event when the it reaches a label. However, you can use a timeline Trigger for that purpose, as described in the following steps:

  1. Move the timeline playhead to the label position.
  2. Click the Insert Trigger tool on the left of the Timeline pane (the diamond shaped tool below the Insert Label flag shaped tool).
  3. Add actions for that trigger.

Regarding how to access Saola Animate document from outside, you already figured out but I still mention it here for other users to find it when needed.
To access Saola Animate document from outside, use global Saola Animate object AtomiSaola:

  • If there is only one document in the page: AtomiSaola.topDocs[0]
  • If there are many documents in the page: AtomiSaola.findDoc(containerId) (containerId is the id of the div tag in which the document is embedded)
  • If the document is embedded in a iframe, use iframeElement.contentWindow.AtomiSaola to get the global Saola Animate object in the iframe page. Please be noticed that the iframe page must have the same domain with the main page, or be configured to allow access from the main page.
  • After getting the Saola Animate document, please use its public APIs to control it. For example, theDocument.pause(), to pause, resume animations in the main timeline.