Skip to main content
Participant
Jun 23, 2025 4:57 AM UTC
Question

jsfl command for Join/Divide Motions

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.

    7 replies

    kglad
    Community Expert
    Community Expert
    Jun 23, 2025 1:46 PM UTC

    what's

     

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

     

    show? 

    Translate
    Participant
    Jun 24, 2025 5:10 AM UTC

    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.

    Translate
    kglad
    Community Expert
    Community Expert
    Jun 24, 2025 2:40 PM UTC

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

    Translate