Skip to main content
September 15, 2010
Question

Crazy happenings with png's blendmodes

  • September 15, 2010
  • 1 reply
  • 627 views

I have this app loading several png's on top

of one another and over a main png. The png's use the blend mode "overlay". Ea

ch area of the png that is supposed to be clear when in overlay mode actually turns about 1% black. With 15 on top

of each other this is very noticable. So my work around was to create a mask for the entire set that didn't

allow the mistake to show.

Then I take a "snapshot" by creating a jpeg using the jpeg encoder class. This works perfectly locally in the flash environment. However, live, there seems to be a shift in the mask right before it gets the bitmap data.

If I remove the cacheAsBitmap on the masker and maskee the save works perfectly. However, the stage looks silly because you can see the edges of that 1% black that is now 15% black.... The png's don't cover the entire stage.

Sooooo what gives? Is this a bug with the latest Flash player? The cache as bitmap has never worked correctly so should I remove it?

Why does the overlay give me a 1% black on each image? How do I get rid of that?

This topic has been closed for replies.

1 reply

February 24, 2011

Same problem here...Did you find any workaround? I tried to contact someone in adobe to highlight this problem, as it's simply amazing that it doesn't work properly. Only in flash in fach, cos after fx has it right.

BR,
Kamil

February 24, 2011

It's a bug in Flash. I actually had to create a mask that masked out all the transparent areas. A real

pain but it was the only way to make it work.

February 25, 2011

It took my quite a lot of time to make a workaround to this issue, but it was worth as all the campaign that i'm preparing right now is based on overlay and multi layers, to make reach the effect.

I used custom written class for Overlay.

http://code.google.com/p/blendmodes4flash/

If next time you'll have to do it again, with this is much easier

Take care!