Initialize a filter with JSFL?

Explorer ,
Oct 24, 2020 Oct 24, 2020

Copy link to clipboard

Copied

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

 

 

Views

53

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

fl.getDocumentDOM().addFilter( YourFilterNameHere  );

 

 

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

LATEST

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/115460...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines