HI,
I have the familar task so I've been using BitmapCopy class for that
purpose:

[as]

import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Matrix;
import flash.geom.ColorTransform;

class com.justversus.utils.BitmapCopy extends MovieClip {

private static  var instance:BitmapCopy;
private static var bmp:BitmapData;

private function BitmapCopy () {};

public static function getInstance():BitmapCopy {
       if ( instance == null ) {
           instance  = new BitmapCopy ();
        }
       return instance;
  }

 public static function copy( source:MovieClip, target:MovieClip,
matrix:Matrix, colorTransform:ColorTransform, blendMode:Object,
clipRect:Rectangle, smooth:Boolean):Void {
      if (clipRect ! = undefined ){
          var w:Number = clipRect.width;
          var h:Number = clipRect.height;
       } else {
            var w:Number = source._width;
            var h:Number = source._height;
       }
      bmp.dispose();
      bmp = new BitmapData( w, h );
      bmp.draw (source, matrix, colorTransform, blendMode, clipRect,
smooth);
      target.attachBitmap (bmp, target.getNextHighestDepth() );
   }
}

[/as]

Cheers,
Oleg
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to