Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Timeline Keyframe scaling using JavaScript and HTML5

Participant ,
Dec 14, 2017 Dec 14, 2017

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

258
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 15, 2017 Dec 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)

Translate
Community Expert ,
Dec 15, 2017 Dec 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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 17, 2017 Dec 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 !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2017 Dec 17, 2017
LATEST

you’re welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines