are the masks rendered as bitmaps?

On 3 Jul 2008, at 16:40, peter ginsberg wrote:

Hoping to get some help with a bizarre bug that has been haunting
development of the current game we're working on.

The situation is this:
We have character animations where we swap in dynamic clothing.  We
developed a system where we add patterns dynamically to the clothing by
doing the following with code:
1. Dupe the movieclip/sprite which is going to get a pattern
2. Use the dupe as a mask on a big square sprite that has the graphic
pattern in it.
3. Put the resulting masked element as a MULTIPLY overlay on the underlying
original clip.

It works great in most cases EXCEPT for this bizarre issue we keep running into where in some clips the mask is partially broken -- seemingly random parts of the movieclip are not masked, or in other parts weird extra lines
appear, or even big blocks.

*Sometimes* you can fix this by going into the movieclip and grouping
ungrouped graphical elements. It gets really messed up if there are more complicated graphical elements in there (like a gradient). In these cases,
even attempts to group elements, or make them movieclips, or whatever,
doesn't seem to help much.

I was able to create a super simple demonstration of this bug, and posted
here:
http://www.thup.com/maskbug.zip

Surprisingly, I was able to replicate the error without any code, just
using CS3. The movieclips on the left and right are both the same, but the one on the right has the lines and fills inside the movieclip groups *separately*. You'll note both of these look just fine in preview, but when you build the swf, the one on the left has a big block of the masked object
showing for no reason.

Someone is probably going to tell me to just group items as I've done in this example, but like I said above that doesn't always work. For some
elements nothing works at all.

This is sort of a bug in flash, but I can't have been the first person to notice it. Does anyone have any idea how we caused it? Is it just that
flash can only support masks that are simple flat color fills?

If it's the latter, I have a follow up question, can anyone think of a
clever way to take the movieclips we are using and convert them into
monotone fills of the same exact dimensions (some kind of bitmapdata
conversion maybe?).

Thanks in advance for any advice!
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to