View Full Version : Bitmap transparency issue
kwigbo
07-15-2006, 07:50 PM
I'm working on a platform game engine. I created a couple classes that will rip apart a sprite sheet and push those frames into an array and animate the sprite when nessary. When I want to send the character left instead of having a bunch of copies of the same sprites just fliped I used scaleX to flip it but all transparent pixels tint everything behind red. Can anybody tell me why this is happening? Check the link below to see what I mean hit the left arrow button after the nerd loads on top of the black box. Hit right again and it goes away it seems to only happen when you scale a bitmap. I can't seem to find a way around it. Is there another way to mirror flip a display object?:confused:
test swf (http://www.kwigbo.com/upload/test2.html)
cparcell
07-15-2006, 11:37 PM
I am guessing that you are using attachMovie() ?? Perhaps look at using copyPixels().
But that is odd about the coloring of the alpha.
cparcell
07-15-2006, 11:48 PM
Sorry, I just remembered what forum I am in. I must be smoking crack again or something. Sorry about that.
So, yeah, attachMovie() is right out.
Perhaps look at using a transformation Matrix object.
http://livedocs.macromedia.com/flex/2/langref/flash/geom/Matrix.html
kwigbo
07-16-2006, 01:47 AM
Perhaps look at using a transformation Matrix object.
I tried that but with the same effect it seems when you transform it in any way all the transparent pixels turn red. I'm stumped.
Fall_X
07-16-2006, 02:04 AM
I tried that but with the same effect it seems when you transform it in any way all the transparent pixels turn red. I'm stumped.
Sounds like a bug in the player. A while back, I noticed xscale is broken in Flash Lite 2 as well, but in a different way. It's probably completely unrelated though.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.