Skip to main content
Participant
February 27, 2018
Answered

using filters in scripts in Animate CC

  • February 27, 2018
  • 1 reply
  • 889 views

Hi.

Here is a simple example:

e.tracer = e.addChild(new lib.Kugel());

var blfl = new BlurFilter(10, 10, 1);

e.tracer.filters = [blfl];

I want to place an object from the library onto the stage and apply a blur filter. The placement part works, the filter does not. I get the message of an unexpected identifier and AdobeAn not being defined.

The documentation I found on this is very confusing to me. Some part seems to be about old Flash documentation, some about just how to apply filters to objects without using a script (but just the Animate interface), which doesn't help me because I wan to do that dynamically via scripts. Some advice I found on this subject seems to apply to CreateJS (which Animate seems to use when exporting to HTML Canvas), but still didn't work. I also read at times something about a Bitmap Filter, but I guess that is only used on Bitmaps and not vector shapes in MovieClips?

I'm confused. If somebody could tell me how to dynamically add filters to objects in Animate CC animations, that would be great. Thanks.

    This topic has been closed for replies.

    1 reply

    marjantrajkovskiCorrect answer
    Inspiring
    February 27, 2018