Copy link to clipboard
Copied
Because it looks like it 100% doesn't work.
an.getDocumentDOM().addFilter("glowFilter");
an.trace(an.getDocumentDOM().getFilters().length); // 0
Thanks. i got it working. i gently beg to differ, though - you can, actually, add a filter to a layer. The feature was added in 2019:
https://helpx.adobe.com/ca/animate/how-to/layer-effects-and-depth.html
It just seems like a really arduous set of steps to follow to get it working. Here's my script:
// This script applies a blue glow filter to the current layer.
// But it's a bit convoluted because of the way addFilter() works.
// You can't instantiate a filter out of thin air.
// So this script
...
i've tweaked the script to make it more robust, though it's just as silly as before. This one will work whether or not there's already artwork on the layer.
// This script applies a blue glow filter to the current layer.
// But it's a bit convoluted because of the way addFilter() works.
// You can't instantiate a filter out of thin air.
// So this script encapsulates the layer's artwork (if it exists)
// as a MovieClip to "protect it,"
// draws an oval, turns the oval into a movieClip, applies th
...
Copy link to clipboard
Copied
a lot of great info in this thread. Learned a lot myself. Great work teamates!