Flash bitmap rendering problem in FireFox

Joined
Jan 16, 2012
Messages
1
Reaction score
0
Points
1
Hello,

I've been working on a flash web application and ran into some problems with the Flash Player for Mac running in FireFox. Was wondering if anyone might help me with some suggestions on how to solve it.

So I have a Sprite object in which I have 10 to 20 MovieClip children. Each child has other 2 to 6 MovieClip children and each child has set blending options (NORMAL, MULTIPLY or LIGHTEN), alpha (most of them are 1) and cacheAsBitmap = true.

Then from this container I create a bitmap which I add to the stage. The result has some rendering bugs as you can see in the image

attachment.php


This is the function I use to create the bitmap

Code:
private function getBitmap(scale:Number = 0.2):Bitmap
{
	var image:Bitmap;
	var scaleMatrix:Matrix = new Matrix();
	var transformMatrix:Matrix = new Matrix();
	
	var _bounds:Rectangle = this.getBounds(this);
	var bitmapData:BitmapData = new BitmapData(_bounds.width, _bounds.height, true, 0x00000000);
	
	transformMatrix.translate( -_bounds.x, -_bounds.y);
	
	scaleMatrix.scale(scale, scale);
	
	transformMatrix.concat(scaleMatrix);
	
	bitmapData.draw(this, transformMatrix, null, null, null, true);
	
	image = new Bitmap(bitmapData);
	image.pixelSnapping = PixelSnapping.NEVER;
	image.smoothing = true;
	
	image.x = _bounds.x * scale;
	image.y = _bounds.y * scale;
	
	return image;
}

I must mention that this happens only on Mac computers if ran in the latest FireFox and if the Flash Player was updated (older versions render it correctly).

Any suggestions will be gratefully appreciated.
Thanks

PastedGraphic-1.png
 
Joined
Nov 15, 2011
Messages
948
Reaction score
150
Points
43
Location
Toronto
Your Mac's Specs
MBP 16” M1max 32/1tb and bunch of other mac/apple stuff
That's bizarre. I use the bitmap class for many projects but haven't seen this behaviour in firefox.

edit: just noticed in this: new BitmapData(_bounds.width, _bounds.height, true, 0x00000000);

the hex value has more 0s than I generally enter. Probably nothing (or something I don't know heh) but I just put: 0x000000
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top