ActivePresenter Saola Animate Pricing Download

Any way to retrieve current timeline frame number?

Problem: I am trying to make a slider button. Is there any way to retrieve the number of the current frame in a symbol timeline and store it in a variable? I intend to make a symbol timeline of say, 100 frames, and move a shape along a linear motion path. Where the shape rests will be the percentage value of the slider, which I need to store in a variable. Is there a way to do this? I’ve looked at the Javascript API and couldn’t see anything that might help. Or is there a simpler solution?!

Saola Animate version: 3

OS: Windows 10

Notes:

Hi John,

There’s no frame concept in Saola Animate.
However, you can get and set timeline timestamp.

// main timeline of the main document
var mainTimeline = doc.getTimeline();
// document in a symbol
var symbolDoc =  doc.getElement('symbol element name').getSymbolDoc();
// main timeline in a symbol
var symbolMainTimeline = symbolDoc.getTimeline();
// get a timeline timestamp, e.g. mainTimeline
var time = mainTimeline.getTimestamp();
// pause a timeline at a time
mainTimeline.pause(time);
// play a timeline from a time
mainTimeline.play(time);

You can take a look at Control animations sample in Samples tab in welcome screen.
Maybe, it’s similar to what you’re trying to do.

Regards

Toan – Many thanks for the speedy response! I’ll follow up your suggestions and get back to you!

It looks like the Control Animations sample is indeed what I want. Now I have to try and figure out how to adapt it for what I want to do…!

1 Like