3 Replies Latest reply on Feb 21, 2012 9:47 AM by Charbs09

    Bitmap rendering problems on Mac / latest FireFox / lates Flash player

    VictorObretin

      Hello,

      I've been working on a flex 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 (although most of them are 1) and cacheAsBitmap = true. Without cacheAsBitmap = true it was a lot worse.

      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:

      PastedGraphic-1.png
      Each face feature, like eyes, nose, hair etc, is a different movie clip within the Sprite object.


      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;
      }
      [/CODE]

      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. Also Chrome has no problems with it.

      Any suggestions will be gratefully appreciated.
      Thank you