Guest User

Untitled

a guest
Sep 24th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public function mcToBitmap5(displayObject:MovieClip,width:Number,height:Number):Bitmap
  2.         {
  3.  
  4.     var bounds:Rectangle = new Rectangle( 9, 0, width, height);
  5.     var bitmap:BitmapData = new BitmapData( int( bounds.width + 0.5 ), int( bounds.height + 0.5 ), false, 0 );
  6.        
  7.         bitmap.draw( displayObject, new Matrix(1, 0, 0, 1, -bounds.x, -bounds.y) );
  8.         var b:Bitmap = new Bitmap();
  9.         b.bitmapData = bitmap;
  10.                
  11.         return b;
  12.         }
Add Comment
Please, Sign In to add comment