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
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???
Copy link to clipboard
Copied
This is a bug.
It should be something like:
an.getDocumentDOM().setElementProperty("firstFrame", 1-3);
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
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.
Copy link to clipboard
Copied
don't reply, just figured it out. figured this would happen.
Copy link to clipboard
Copied
Thanks. How do I make it so that it creates a keyframe when I switch the instance?
Copy link to clipboard
Copied
don't reply again. I'm good at finding solutions after asking for them.