Skip to main content
Participant
June 23, 2025
Question

jsfl command for Join/Divide Motions

  • June 23, 2025
  • 1 reply
  • 242 views

Hello! I'm creating a jsfl scripts to automatically transfer classic tweens to motion tweens.
I'm looking for the jsfl functions that can do the join motions/ devide motions function from menu.
However I couldn't find it in api documentations. Is there any ways to do that?
P.S: The reason why I need to create this script is that the engine I use doesn't support classic tweens, but with motion tweens the transformation point offset shifting bugs make animation editting impossible to do.

    1 reply

    kglad
    Community Expert
    Community Expert
    June 23, 2025

    what's

     

    var tweenObj = fl.getDocumentDOM().getTimeline().layers[0].frames[0].tweenObj;
    for(var s:String in tweenObj){
    trace(s+" : "+tweenObj[s]);
    }

     

    show? 

    Participant
    June 24, 2025

    startFrame : 0
    duration : 24
    tweenType : motion object

    This layer I test has keyframes at 1,5,10,20,25,29,30f.
    While 1,5,10,20 shares the same symbol, the 25,29,30 using another.
    So, what I want to acheive is to make 1,5,10,20 becomes the same motion object.
    It got me confused, so is this shows that they are already one? But they are not tween with each others.
    I need to manually join motions for them and delete the new generated properties keyframes.

    kglad
    Community Expert
    Community Expert
    June 24, 2025

    no new tweenobj properties so there are probably no new methods.