Hi Friends, i have a small issue, could u please help me regarding this ! I have number of images and a textarea. Now if i click on a particular image, it should be catched and now if i click on the textarea the images should be pasted here based on the x and y positions clicked. I am able to get that. But the problem now is i need to add multiple images based on the x and y positions clicked , but even the textarea functionality should work.
see the application here <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*"> <mx:Script> <![CDATA[ import com.roguedevelopment.objecthandles.ObjectHandles; import mx.containers.Canvas; import mx.controls.Alert; public var xx:int=10; public var yy:int=10; public var sWidth:int=50; public var sHeight:int=50; public var currentShape:String; public var txtareachilds:int=0; public var drawCanvas:Canvas; public function textAreaClick():void { //textArea.htmlText="<img src='"+tilerepeatercomp.kk1+"'>"; drawCanvas=new Canvas(); drawCanvas.height=100; drawCanvas.width=100; drawCanvas.setStyle('borderStyle','solid'); var ohObj:ObjectHandles=new ObjectHandles(); ohObj.setStyle("backgroundImage",tilerepeatercomp.kk1); ohObj.setStyle("backgroundSize","100%"); ohObj.allowRotate=true; ohObj.minHeight=sHeight; ohObj.minWidth=sWidth; ohObj.x=drawCanvas.mouseX; ohObj.y=drawCanvas.mouseY; drawCanvas.addChild(ohObj); Alert.show(drawCanvas.getChildren().length+''); textArea.addChild(drawCanvas); } ]]> </mx:Script> <mx:VBox id="vb" width="100%" height="100%" > <local:tilerepeatercomp /> <mx:TextArea id="textArea" width="100%" height="100%" click="textAreaClick()" > </mx:TextArea> </mx:VBox> </mx:Application> tilerepeatercomp : <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" height="300" horizontalScrollPolicy="off" creationComplete="hs.send();" backgroundColor="#fafbfc" xmlns:ResizableWindow="AppComps.ResizableWindow.*"> <mx:HTTPService url="Data.xml" id="hs" result="hs_resultHandler(event)" fault="Alert.show(event.fault.toString());" resultFormat="e4x" /> <mx:Script> <![CDATA[ import mx.core.Application; import mx.events.ListEvent; import mx.containers.VBox; import mx.managers.PopUpManager; import mx.controls.Alert; import mx.rpc.events.ResultEvent; [Bindable] public var xList:XMLList=new XMLList(); protected function hs_resultHandler(event:ResultEvent):void { //Alert.show(event.result..xmail.repdata.toString()); xList=event.result..xmail.repdata as XMLList; testfun(); } [Bindable] var kk:XMLList=new XMLList(); public function testfun():void { for(var i:int=0;i<xList.children().length();i++) { //Alert.show(i+''); kk=xList.imgdata[i].children() as XMLList ; // Alert.show(kk+''); } //Alert.show(xList.children().length()+''); //Alert.show(xList.imgdata[1].children().length()+''); } //public function eachClick(event:Event,dynmicText:Image):void [Bindable]public static var kk1:String; public function eachClick(event:Event):void { //Alert.show(img.+'fghfgh'+img.width+'hjghj'); kk1=new String(); kk1=event.currentTarget.source; //Alert.show(event.currentTarget.source,'Nag'); } ]]> </mx:Script> <mx:VBox width="100%" height="100%" horizontalAlign="center"> <mx:VBox width="200" > <mx:Repeater id="rep" dataProvider="{xList}" > <mx:HBox width="100%" backgroundColor="#B9C3C6"> <mx:Label text="{rep.currentit...@txt}" /> </mx:HBox> <mx:HBox width="100%" > <mx:Tile direction="horizontal" width="200"> <mx:Repeater id="rep2" dataProvider="{rep.currentItem.imgdata.children()}" > <!--<mx:HBox id="imgbox" width="100%" height="100%">--> <mx:Image id="img" source="{'images/charts/'+rep2.currentItem +'.PNG'}" click="eachClick(event)" /> <!--<mx:Image id="img" source="{'images/ charts/'+rep2.currentItem+'.png'}" styleName="Buttonkk" click="clicker(event);" />--> <!--</mx:HBox>--> </mx:Repeater> </mx:Tile> </mx:HBox> </mx:Repeater> </mx:VBox> </mx:VBox> </mx:VBox> and the data.xml is <xml> <xmail> <repdata txt='Column'> <imgdata> <img1>left</img1> <img2>down</img2> <img3>top</img3> <img4>crossline</img4> <img5>n</img5> <img6>col6</img6> <img7>col7</img7> <img8>col8</img8> <img9>col9</img9> <img10>col10</img10> <img11>col11</img11> <img12>col12</img12> <img13>col13</img13> <img14>col14</img14> </imgdata> </repdata> <repdata txt='Line'> <imgdata> <img1>line1</img1> <img2>line2</img2> <img3>line3</img3> <img4>line4</img4> <img5>line5</img5> <img6>line6</img6> <img7>line7</img7> </imgdata> </repdata> <repdata txt='Pie'> <imgdata> <img1>pie1</img1> <img2>pie2</img2> <img3>pie3</img3> <img4>pie4</img4> <img5>pie5</img5> <img6>pie6</img6> </imgdata> </repdata> <repdata txt='Bar'> <imgdata> <img1>bar1</img1> <img2>bar2</img2> <img3>bar3</img3> <img4>bar4</img4> <img5>bar5</img5> <img6>bar6</img6> <img7>bar7</img7> <img8>bar8</img8> <img9>bar9</img9> <img10>bar10</img10> </imgdata> </repdata> </xmail> </xml> -- 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.

