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

Making a command to use the “Frame Picker”

Explorer ,
Aug 17, 2023 Aug 17, 2023

Copy link to clipboard

Copied

(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

Views

302

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

This is a bug.

 

It should be something like:

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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