Le code de l'application:
CODE
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
<mx:XML id="mesicones">
<icones>
<icone url="/icon/icon1.gif" title="icon1" />
<icone url="/icon/icon2.gif" title="icon2" />
<icone url="/icon/icon3.gif" title="icon3" />
</icones>
</mx:XML>
<mx:VBox>
<mx:Repeater id = "myrepeater1" dataProvider="{mesicones.icone}">
<local:test_comp
_Id = "mxHbox{myrepeater1.currentIndex}"
_Text = "{myrepeater1.currentItem.@title}"
UrlIcon = "{myrepeater1.currentItem.@url}"
x="10" y="10" fontSize="32"/>
</mx:Repeater>
</mx:VBox>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">
<mx:XML id="mesicones">
<icones>
<icone url="/icon/icon1.gif" title="icon1" />
<icone url="/icon/icon2.gif" title="icon2" />
<icone url="/icon/icon3.gif" title="icon3" />
</icones>
</mx:XML>
<mx:VBox>
<mx:Repeater id = "myrepeater1" dataProvider="{mesicones.icone}">
<local:test_comp
_Id = "mxHbox{myrepeater1.currentIndex}"
_Text = "{myrepeater1.currentItem.@title}"
UrlIcon = "{myrepeater1.currentItem.@url}"
x="10" y="10" fontSize="32"/>
</mx:Repeater>
</mx:VBox>
</mx:Application>
Le code du composant :
CODE
<?xml version="1.0" encoding="utf-8"?>
<mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml" label="{_Text}"
icon="@Embed(source={UrlIcon})">
<mx:Script>
<![CDATA[
[Bindable] public var _Id:String;
[Bindable] public var _Text:String;
[Bindable] public var UrlIcon:String;
// [Embed(source=UrlIcon)]
//[Bindable]private var icon_category : Class;
]]>
</mx:Script>
</mx:LinkButton>
<mx:LinkButton xmlns:mx="http://www.adobe.com/2006/mxml" label="{_Text}"
icon="@Embed(source={UrlIcon})">
<mx:Script>
<![CDATA[
[Bindable] public var _Id:String;
[Bindable] public var _Text:String;
[Bindable] public var UrlIcon:String;
// [Embed(source=UrlIcon)]
//[Bindable]private var icon_category : Class;
]]>
</mx:Script>
</mx:LinkButton>
Quelqu'un a une idée pour resoudre le probleme?
merci
