Skip to main content
Inspiring
October 24, 2020
Question

Initialize a filter with JSFL?

  • October 24, 2020
  • 1 reply
  • 417 views

i'm trying to apply a filter to a layer using JSFL, but i only understand how to derive an existing filter from somewhere else. i don't quite know how to initialize/instantiate a filter out of thin air.  Is it possible?

 

Right now, i'm manually applying a filter to the bottommost layer, and then my JSFL script uses getFiltersAtFrame/setFiltersAtFrame to apply that filter to other layers. i'd love to be able to skip that first manual step, though. 

All of the examples i see in the documentation begin with some form of "getFilters" before using some form of "setFilters." But i don't see any sort of "whatever = new Filter()" intialization, or any way to work with a filter that doesn't preexist.

 

- Ryan

 

 

    This topic has been closed for replies.

    1 reply

    Vladin M. Mitov
    Inspiring
    October 29, 2020

    fl.getDocumentDOM().addFilter( YourFilterNameHere  );

     

     

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

    Thanks, Vladin (and i LOVE the Flanimate Power Tools!) But addFilter() doesn't work as expected:

     

    https://community.adobe.com/t5/animate/jsfl-so-does-document-addfilter-just-like-not-work/m-p/11546025?page=1#M336789