Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JSFL - So does document.addFilter() just, like... not work?

Participant ,
Oct 27, 2020 Oct 27, 2020

Because it looks like it 100% doesn't work.

 

an.getDocumentDOM().addFilter("glowFilter");
an.trace(an.getDocumentDOM().getFilters().length); // 0

 

 

 

3.2K
Translate
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

correct answers 2 Correct answers

Participant , Oct 27, 2020 Oct 27, 2020

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
...
Translate
Participant , Oct 29, 2020 Oct 29, 2020

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
...
Translate
Community Expert ,
May 19, 2022 May 19, 2022

 a lot of great info in this thread. Learned a lot myself. Great work teamates!

Translate
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