/ Published in: ActionScript
URL: http://www.actionscript.org/forums/archive/index.php3/t-139095.html
Expand |
Embed | Plain Text
private function takeSnapshot(picSubject:MovieClip, offSet:Boolean, parentClip:MovieClip) { var bmd:BitmapData = new BitmapData(picSubject._width, picSubject._height, true, 0xFF0000); if (offSet) { var mat:Matrix = new Matrix(); mat.translate(picSubject._width/2, picSubject._height/2); bmd.draw(picSubject, mat); } else { bmd.draw(picSubject); } var mc:MovieClip = parentClip.attachMovie("bmdHolder", "bmdHolder", parentClip.getNextHighestDepth()); mc.bmdHolderShim._width = picSubject._width; mc.bmdHolderShim._height = picSubject._height; mc.attachBitmap(bmd, mc.getNextHighestDepth()); return mc; }
You need to login to post a comment.
