If you acknowledged the answers you where given to previous requests for help maybe calling people friend would sound more sincere. You where shown how to scale images already was that process not working ?
Thanks alot for your reply.this time looking littlebit rude.i extreamly sorry if u mind my new discussion with same query.Actually your logic is perfect and working for all UIComponent but in my case its not working.thats why i again asked the question with scale factor.but now my problem has been solved.this time i need to take two UIComponent and two bitmapdata.
Anyways Thanks alot for your help.its truly helpful for me.and I ll remeber your lines and try to implement it in future.
Thanks and regards
the following is a full application that captures the canvas(when you click) then saves it to a file, so you can see the result.
for this to work correctly(file save) you need to make sure your project compiler settings target flashplayer 10.0.0
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
protected function canvas1_mouseDownHandler(event:MouseEvent):void
var pngenc:PNGEncoder = new PNGEncoder();
var bmd:BitmapData = new BitmapData(cnvs.width,cnvs.height,true,0xffffff);
var mt:Matrix=new Matrix();
var ba:ByteArray = new ByteArray()
ba = pngenc.encode(bmd);
var fi:FileReference = new FileReference();
<mx:Canvas width="200" height="200" id="cnvs" mouseDown="canvas1_mouseDownHandler(event)">
<mx:Button x="10" y="10" label="Button"/>
<mx:CheckBox x="44" y="66" label="CheckBox"/>
<mx:CheckBox x="44" y="125" label="CheckBox"/>