Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Making a command to use the “Frame Picker”

Explorer ,
Aug 17, 2023 Aug 17, 2023

(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

527
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2023 Aug 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???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2023 Aug 17, 2023

This is a bug.

 

It should be something like:

an.getDocumentDOM().setElementProperty("firstFrame", 1-3);
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2023 Aug 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2023 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2023 Aug 17, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2023 Aug 17, 2023

Thanks. How do I make it so that it creates a keyframe when I switch the instance?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 17, 2023 Aug 17, 2023
LATEST

don't reply again. I'm good at finding solutions after asking for them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines