Skip to main content
This topic has been closed for replies.
Correct answer Vladin M. Mitov

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.

 

 

4 replies

Vladin M. Mitov
Vladin M. MitovCorrect answer
Inspiring
March 16, 2023

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
kqskcmAuthor
Known Participant
March 16, 2023

grateful! perfect solution

Vladin M. Mitov
Inspiring
March 15, 2023

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

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

 

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

Custom Tools in the toolbar

Vladin M. Mitov
Inspiring
March 15, 2023

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


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

keyDown()

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

 

keyUp()

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

kglad
Community Expert
Community Expert
March 14, 2023

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

JoãoCésar17023019
Community Expert
Community Expert
March 14, 2023
kglad
Community Expert
Community Expert
March 14, 2023

you're trying to add shortcut keys to what?