2 Replies Latest reply on Dec 6, 2017 6:00 AM by JoãoCésar

    Scripting the import of a moviefile (for animation-reference)


      For an animated movie production I have to prepare 200+ Animate-projects. I want to do this automatically by using python

      to process a list of scenes and then passing all the arguments to a function (with "fl.runScript(functionname, arguments etc...))

      So far this all works, but what I cannot figure out is how to use the fljs-scriptlanguage to import a moviefile and place it on the timeline,

      So that an animator can use this storyboard-moviefile as a reference.


      I was thinking that something like this should work:


      var doc =  fl.getDocumentDOM();

      var libIndex = doc.library.library.findItemIndex("Sq080_sc210_sh020_animatic_v001");

      var myLibItem = doc.library.items[libIndex];

      fl.getDocumentDOM().getTimeline().layers[0].frames[0].element[0].libraryItem = myLibItem;


      .. but i gives the error: "fl.getDocumentDOM().getTimeline().layers[0].frames[0].element[0] is undefined", which sounds logical.

      ..because the stage is empty(contains no elements)

      How can I add an element to a frame(scriptwise) for linking it to my LibraryItem?


      I searched all the contents of:

      Adobe Flash Professional * Extending Adobe Flash Professional

      But couldn't find anything.


      Does anyone have the answer?