Skip to main content
albertd9194959
Inspiring
December 14, 2017
Answered

Timeline Keyframe scaling using JavaScript and HTML5

  • December 14, 2017
  • 1 reply
  • 279 views

Hi All !

Is there a way to dynamically add and remove keyframes on the timeline accross all layers using Javascript in order to automate timeline scaling to match new timings ?

The scenario:

-  200 frame scene in sync with English audio.

( We have created paragraph breaks that align with certain frames, M1 at 20 frames,  M2 at 60 frames and M3 at 120 frames )

- Translate into Armenian

- Scene needs to be increased by 100 frames to sync with audio total length.

- M1 still aligns, but, M2 and M3 do not. ( Visuals no longer match audio )

- Use JavaScript to automatically add 50 frames at M2 and M3. ( Visuals now match Audio)

Is something like this possible ?

Regards

This topic has been closed for replies.
Correct answer kglad

yes, you can use jsfl to do that:

var tl = fl.getDocumentDOM().getTimeline();

tl.insertFrames(50,true, 48)

tl.insertFrames(50,true, 148)

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 15, 2017

yes, you can use jsfl to do that:

var tl = fl.getDocumentDOM().getTimeline();

tl.insertFrames(50,true, 48)

tl.insertFrames(50,true, 148)

albertd9194959
Inspiring
December 17, 2017

Thanks kglad ! Just what i was looking for!

For anyone else interested found this post:

Is there a way to insert a blank key frame between two other key frames?

Thanks !

kglad
Community Expert
Community Expert
December 18, 2017

you’re welcome.