Skip to main content
Firewood:D
Inspiring
June 18, 2025
Question

How to specify the size of the brush tool in jsfl

  • June 18, 2025
  • 1 reply
  • 152 views

As shown below, the code can only switch to the brush tool, but the thickness cannot be specified. Looking through the API, thickness only applies to the paintBrush tool and cannot set the brush size. Is there a way to implement the function of specifying the size?

var fill = fl.getDocumentDOM().getCustomFill("toolbar");
fill.color = "#FF0000";
fill.thickness = 10;//Cannot be specified here, thickness is invalid
fl.selectTool("brush");
fl.getDocumentDOM().setCustomFill(fill);

    1 reply

    DigitalDesignDude
    Inspiring
    September 21, 2025

    I would like to know as well if this is possible somehow.

    From what I can tell, the brush size doesn't seem to be editable via JSFL as there's no property for it in the Animate SDK Docs. And Justin from Ajar Productions may not have been able to access it either, given his comment about it here.

    It's too bad because such a property would have been handy for brush related extensions I wanted to make. I think I'm left with re-creating the brush tool so that I can change its size with JSFL.