Skip to main content
Inspiring
June 27, 2012
Question

Modifying MovieClip filters breaks animations

Flash can be frustrating as hell, sometimes.  Here is my latest roadblock -- if you know how to fix this problem, please let me know.  Thank you!!!

1)  I create an animated character using CS5.5, and compile it into a swf.

2)  I load the character's swf into a new document (programmatically, via a Loader), and add it to the display list.  So far, no problems: the character is animating just fine.

3)  BUT, the character is too large for my current scene, so I scale its root container down (scaleX = scaleY = 0.3 -- something like that ).

4)  Wow!!  I realize filters on nested Sprites and MovieClips are not scaled along with the root container !!!  Undeterred, I write a little recursive function to navigate down the display tree of the character, and scale down all the filter properties that can be scaled.

5)  So far so good: the character and all its root & nested filters are now properly sized, BUT the nested MovieClips within the character whose filters got modified no longer play their animations!!!

6)  I try to force them to play programmatically to no avail (ex: myCharacterMc.headMc.gotoAndPlay( "eyes_blinking" ) ).  What gives???

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Participating Frequently
November 7, 2021

It is 9 years afdter this post and I just went through hell for 1 day because I added a filter to my movieclip.  It destroyed all of the an imation inside that I wired up with HTML5 code.  I am soooo pissed I lost all this time.  why in the world is this feature here if it breaks the movie animation?  This should be a big warning to tell you this.  Wow!  I am so frustrated.  i could have spent 5 hours of good work instead Im sitting on my hands in complete frustration.

Translate
kglad
Community Expert
Community Expert
June 28, 2012

assigning a filter to a timeline animation will break the timeline animation (as you now know).  there is no work-around that i know of except, don't apply a filter.

and that gets back to your problem of unsized filters.  i am not aware of that being a problem.

what are you seeing that makes you think your filters are not scaling (4)?

Translate
Inspiring
June 29, 2012

Thank you kglad for confirming that applying filters break the timeline.

Scaling a parent container doesn't scale the filters of descendants, afik.  So, if you have a sprite which contains a shape, and the shape has a drop shadow extending 5 pixels, and if you scale down the Sprite, the drop shadow remains 5 pixels!  Not the what I was expecting.

If you want to scale the filters on descendants, then you have to have to write a recursive function to scale down the filter properties that are scalable.

Translate