Skip to main content
MalrusAnimations
Inspiring
August 17, 2023
Question

Making a command to use the “Frame Picker”

  • August 17, 2023
  • 2 replies
  • 534 views

(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 has been closed for replies.

    2 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    August 17, 2023

    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

    MalrusAnimations
    Inspiring
    August 17, 2023

    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.

    MalrusAnimations
    Inspiring
    August 17, 2023

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

    MalrusAnimations
    Inspiring
    August 17, 2023

    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???

    JoãoCésar17023019
    Community Expert
    Community Expert
    August 17, 2023

    This is a bug.

     

    It should be something like:

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