here... whipped a code fr ya.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
private function copyContainter():void {
var bdata:BitmapData = new BitmapData(mylogin.width,
mylogin.height, false);
bdata.draw(mylogin);
var bitmap:Bitmap = new Bitmap(bdata);
myCopy.source = bitmap;
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Button label="Copy Containter" click="copyContainter()"/>
</mx:ApplicationControlBar>
<mx:VBox id="mylogin" backgroundColor="#33CCCC" width="347" height="177"
verticalAlign="middle" horizontalAlign="center">
<mx:Form width="321" height="123">
<mx:FormItem label="username:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="password:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem>
<mx:Button label="Button"/>
</mx:FormItem>
</mx:Form>
</mx:VBox>
<mx:Image id="myCopy" />
</mx:Application>
hope it helps.
regards,
Varun Shetty
On Fri, Sep 26, 2008 at 1:33 AM, DineshKumar. T <[EMAIL PROTECTED]>wrote:
> Hey dude,
>
> i tried in many ways still i got confused with this.....anyway i did a
> sample hope you may get
> some idea from this....if u done please tell me how....
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout="vertical"
> >
> <mx:Script>
> <![CDATA[
> *import* mx.controls.Label;
> *import* mx.core.UIComponent;
>
> *private* *function* getLabel() : *void*{
> *var* bitmapData : BitmapData = *new* BitmapData( lbl.width, lbl.height );
> bitmapData.draw( lbl, *new* Matrix() );
> myImage.source = *new* Bitmap( bitmapData );
> }
> ]]>
> </mx:Script>
> <mx:Label id="lbl" click="getLabel()" text="click" width="100" height="20"
> />
> <mx:Image id="myImage" />
> </mx:Application>
>
>
> Regards,
> DineshKumar.T
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---