Can you share your : Images/catalog.xml , so that i can run your code at my end.
On Tue, Nov 3, 2009 at 3:00 AM, ManInAction <[email protected]>wrote: > > Hi Friend, > > I am not enable to use embed icon in Radio button.I m using radio > button inside repeater.when i run my application is show Error=unable > to resolve 'Images/png_1.png' for transcoding... > I m loading my "CustButton.mxml inside cropImages.mxml. > here is my code:- > > My CustButton.mxml:- > > <?xml version="1.0"?> > <!-- repeater\myComponents\CustButton.mxml --> > <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"> > > <mx:Script> > <![CDATA[ > > import mx.controls.Alert; > import com.adobe.viewsource.ViewSource; > > import flash.display.MovieClip; > > //[Embed(source='button_icons.swf', symbol='square')]; > // [Embed(source="assets/button_icons.swf#square")] > > [Bindable] > > private var icon0:Class; > > [Bindable] > > > public var dp:Array=[1,2,3,4]; > > > > public function check(comment:String):void{ > > Alert.show(comment); > } > > > > ]]> > </mx:Script> > > <mx:HTTPService id="catalogService" > resultFormat="e4x"/> > <mx:XMLListCollection id="myXC" > source="{catalogService.lastResult.product}"/> > <mx:Repeater id="r" dataProvider="{myXC}"> > <mx:RadioButton id="Radio" label="{r.currentItem.name}" > > width="150" icon="@Embed(source='Images/png_1.png')"/> > > > </mx:Repeater> > > </mx:VBox> > > > here is my cropImage.mxml:- > > ?xml version="1.0"?> > <!-- repeater\RepeatCustButton.mxml --> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > xmlns:MyComp="myComponents.*" creationComplete="createHandlers > (event)"> > > <mx:Script> > <![CDATA[ > import mx.controls.Alert; > > private var someVar:String ="Images/catalog.xml"; > public function getLabelRep(e:Event):void { > detail_Panel.visible=true; > comp.catalogService.url="Images/catalog.xml"; > //Alert.show(comp.repbutton[0].label); > > > } > public function createHandlers(e:Event):void { > b1.addEventListener(MouseEvent.CLICK, getLabelRep); > b1.addEventListener(MouseEvent.CLICK, function(){ > comp.check(someVar) > }); > b1.addEventListener(MouseEvent.CLICK, comp.catalogService.send); > } > ]]> > </mx:Script> > <mx:Panel id="detail_Panel" x="69" y="55" width="700" height="400" > layout="absolute" > title="Login" horizontalCenter="0" verticalCenter="0" visible="false"> > <mx:Canvas verticalCenter="0" horizontalCenter="0"> > <MyComp:CustButton id="comp"/> > </mx:Canvas> > </mx:Panel> > <mx:Button label="Get label of Repeated element" width="200" id="b1" > icon="@Embed(source='Images/png_1.png')"/> > > </mx:Application> > > Please help me.... > > thanks > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

