Have u tried with browser(IE or chrome )

On 2 November 2011 09:33, dhiraj gupta <[email protected]> wrote:

> Hi,
>
> I want to create image in ViewStack Child. I am using below code but it
> will show me Error("Error :2015::ArgumentError").
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute" >
>
> <mx:Script>
>     <![CDATA[
>         import mx.controls.Image;
>         import mx.controls.Alert;
>          import mx.graphics.ImageSnapshot;
>
>         public function onclick():void
>         {
>             var cnt:Number=0;
>             while(cnt<2)
>             {
>                 viewStackHplcID.getChildAt(cnt).visible =true
>                 v.addChild(getimage(viewStackHplcID.getChildAt(cnt)))
>                 cnt++
>             }
>
>
>         }
>         private function getimage(target:*):Image
>         {
>             try
>             {
>             var bd:BitmapData = ImageSnapshot.captureBitmapData(target);
>             var bm:Bitmap=new Bitmap(bd)
>             var image:Image = new Image()
>             //image.scaleX =image.scaleY=0.5
>             image.source = bm
>             }
>             catch(e:Error)
>             {
>                 Alert.show("Error"+e.message+"::"+e.errorID+"::"+e.name)
>             }
>             return image;
>         }
>     ]]>
> </mx:Script>
> <mx:VBox>
>     <mx:ViewStack id="viewStackHplcID"  creationPolicy="all">
>
>     <mx:Canvas id="cnsHplcTable" label="Table">
> <mx:Button click="{viewStackHplcID.selectedIndex=1}" x="312" y="153"
> label="jkhk"/>
>
>     </mx:Canvas>
>
>     <mx:Canvas id="g" label="Table">
> <mx:Button click="{viewStackHplcID.selectedIndex=0}"  label="df" x="214"
> y="96"/>
>
>     </mx:Canvas>
>
>     </mx:ViewStack>
> <mx:Button click="onclick()"  label="onclick"/>
> <mx:VBox id="v"/>
> </mx:VBox>
> </mx:Application>
>
> Please help me how to resolve this issues.
> Thanks in advanced.
>
> Dheeraj
>
> --
> 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.
>

-- 
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.

Reply via email to