Home » AS3, Strange/Bugs

Strange behavior with masks in Flash CS3 (and 10)

24 January 2009 No Comment

Here is the case:

I have one MovieClip called “container” that holds several other MovieClips. Each one of these MovieClips have a dropshadow filter applied to them.

The “container” mc is masked by a shape on the timeline and one can scroll up and down this mc via a scrollbar.

Well, now it seems that the more MovieClips the “container” mc contains, the slower the scrolling is (which is logical). And it’s true until the “container” mc reaches a certain height. I sai “certain” because I didn’t really bother to calculate it (just a trace statement, I know, I juste didn’t have time, was in a hurry, etc…) But the fact remains. And when this “container” mc reaches a certain height, the scrolling becomes suddently faster

I thought that it must be something with the height limit (2880 pixels) when filters are applied on a DisplayObject or something like that. But none of the filters were disabled. I even tried to put the filter only on the “container” mc (and not on its children). Same behavior.

It means that, somehow, after a limit in size had been reached, flash doesn’t do something that speeds up the whole thing.
I learned that masks, when used on the timeline, can be the source of a lot of troubles (ex: if mask is tweened on the timeline, all the DisplayObjects that are masked by this mask will be recreated at each keyframe of the mask timeline, just try and you’ll see…)

Now if someone can explain me why this is happenning and how to “fix” it, that would be nice, because I could not find anything about it.

Tkx.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • E-mail this story to a friend!
  • LinkedIn
  • TwitThis

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.