Skip to main content
MalrusAnimations
Inspiring
Aug 17, 2023 4:22 PM UTC
Question

Making a command to use the “Frame Picker”

(I swear I'm always on here for something then figure it out straight after, but I'm not good at AS3 so I am gonna need help)

I want to use keybinds for selecting frames in the Frame Picker. So I used the history tool to make the "Instance Property" change (when I change the frame in the Frame Picker) it's own command but when I go to use it I get a syntax error. This one isn't an urgent problem but would be really nice to know a fix so I can ditch the Frame Picker once and for all.

 

I make it sound like I have a big problem with the Frame Picker, if anything it's what made me want to animate in the first place, but a physical solution would be better for me

    This topic is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    Aug 17, 2023 5:24 PM UTC

    Hi.

     

    You can create a command for each frame like this...

     // the index of the first frame is 0, second is 1, third is 2, and so on.
    fl.getDocumentDOM().selection[0].firstFrame = 0;

     

    ... then assign different shortcuts to them.

     

    You can also include in the code a prompt to choose the desired frame.

     

    Regards,

    JC

    Translate
    MalrusAnimations
    Inspiring
    Aug 17, 2023 5:35 PM UTC

    Hi, thanks for the suggestion. I typed the string into Notepad, then saved it as a jsfl but when I use the command then nothing happens.

    Translate
    MalrusAnimations
    Inspiring
    Aug 17, 2023 5:47 PM UTC

    don't reply, just figured it out. figured this would happen.

    Translate
    MalrusAnimations
    Inspiring
    Aug 17, 2023 5:21 PM UTC

    If it helps, here is the exact error I got:

    A JavaScript error has occurred.

    At line 8 of file "insert file name here.jsfl":

    an.getDocumentDOM().setElementProperty(%S%d-1)

     

    SyntaxError: syntax error

     

    I have no clue what's wrong, other than the fact that maybe I haven't specified the document name???

    Translate
    JoãoCésar17023019
    Community Expert
    Community Expert
    Aug 17, 2023 5:25 PM UTC

    This is a bug.

     

    It should be something like:

    an.getDocumentDOM().setElementProperty("firstFrame", 1-3);
    Translate