I don't know if is the best method, but you can to define a function in compositionReady and execute this with setInterval at your prefer interval (1s. , 5s., etc.)...
For a sample made earlier, I used this in composition ready and it works fine:
var timelinePos = sym.getPosition();
Thanks for the reply.
However, what I wanted to do is to have an action triggered at certain time elapse, for example, every 4 secs, not at the click handler.
What I had done now is the tedious way of inserting a function call at every 4 seconds. Then at the CompositionReady, I create the function definition to catch the function call. This is not exactly the most elegant approach.
I need to place the sym.getPosition() in a loop that is firing at every 4 secs accurately. This will then get rid of placing my function call at every 4 secs instead.
Is there any elegant way of doing this?
I also think that you can find the time on the timeline with something like this
and use t values to do something instead of the alert.