Skip to main content
This topic is closed to new replies. Start a new post to keep the conversation going.
Vladin M. Mitov
Vladin M. MitovCorrect answer
Inspiring
Mar 16, 2023 6:58 AM UTC

OK, you could use a JSFL command to select the tool you want.
The command can be triggered with a key of your choice from the keyboard.

I'll use the PolyStar tool as an example, but assume it's any script you want:


1. Go to the Tools folder in Animate and find the PolyStar.jsfl file.

2. Open it and find the configureTool() function.

 

3. Pay attention to the line
    theTool.setToolName("polystar");
    and write down the name in the parentheses.

 

4. Go to the Commands folder in Animate and create a file called SelectPolyStar.jsfl.

 

5. Write the following code in it:
   fl.selectTool("polystar");
   and save it.

 

6. In Animate, open Edit > Keyboard shortcuts > Commands, select SelectPolyStar and assign a keyboard key you want.

 

 

- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation

14 replies

Vladin M. Mitov
Vladin M. MitovCorrect answer
Inspiring
Mar 16, 2023 6:58 AM UTC

OK, you could use a JSFL command to select the tool you want.
The command can be triggered with a key of your choice from the keyboard.

I'll use the PolyStar tool as an example, but assume it's any script you want:


1. Go to the Tools folder in Animate and find the PolyStar.jsfl file.

2. Open it and find the configureTool() function.

 

3. Pay attention to the line
    theTool.setToolName("polystar");
    and write down the name in the parentheses.

 

4. Go to the Commands folder in Animate and create a file called SelectPolyStar.jsfl.

 

5. Write the following code in it:
   fl.selectTool("polystar");
   and save it.

 

6. In Animate, open Edit > Keyboard shortcuts > Commands, select SelectPolyStar and assign a keyboard key you want.

 

 

Translate
- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation
kqskcmAuthor
Known Participant
Mar 16, 2023 8:05 AM UTC

grateful! perfect solution

Translate
Vladin M. Mitov
Inspiring
Mar 15, 2023 11:40 AM UTC

Please provide more clarity on what type of extension you are interested in:

  • SWF panel
  • CEP panel
  • JSFL command
  • JSFL tool

 

Translate
- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation
kqskcmAuthor
Known Participant
Mar 15, 2023 4:15 PM UTC

Custom Tools in the toolbar

Translate
Vladin M. Mitov
Inspiring
Mar 15, 2023 4:47 PM UTC

OK, we clarified that we're talking about a JSFL tool.
Now we need to figure out exactly what the problem is:

- You want to bind a custom keyboard shortcut to quick select (activate) the tool in the tool palette.
- Or you developing the tool yourself and want to implement different actions when a certain keyboard keys are pressed


Translate
- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation
Multoman
Inspiring
Mar 14, 2023 5:57 PM UTC

keyDown()

function keyDown() {
fl.trace("key " + fl.tools.getKeyDown() + " was pressed");

 

keyUp()

function keyUp() {
fl.trace("Key is released");
}
}

Translate
kglad
Community Expert
Community Expert
Mar 14, 2023 7:26 PM UTC

i don't think actionscript is going to help with this question.

Translate
JoãoCésar17023019
Community Expert
Community Expert
Mar 14, 2023 7:55 PM UTC
kglad
Community Expert
Community Expert
Mar 14, 2023 2:41 PM UTC

you're trying to add shortcut keys to what?

Translate