外部アイテムレンダラーを備えたリストコンポーネントがあります。私の itemrender は、実行時にロードしたいモジュールです。
moduleloader タグを使用しましたが、何も表示されません。moduleloader タグを使用しない場合、<modulename>
代わりに<productsView:menuBtn>
コンテンツが表示されます。
誰も私がこれを行う方法を知っていますか?
リスト コンポーネントを含むアプリケーション ファイル
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
initialize="catagories.send();">
<mx:HTTPService id="catagories" url="data/products.xml"
resultFormat="e4x"/>
<mx:XMLListCollection id="myXC"
source="{catagories.lastResult.product}"/>
<mx:List id="r" dataProvider="{myXC}"
width="185" height="100%"
backgroundAlpha="0"
paddingTop="0"
paddingBottom="0"
paddingLeft="0"
paddingRight="0"
borderStyle="none">
<mx:itemRenderer>
<mx:Component>
<mx:ModuleLoader url="productsView/menuBtn.swf"/>
</mx:Component>
</mx:itemRenderer>
</mx:List>
</mx:Application>
私のモジュール
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
width="185"
paddingLeft="3"
paddingRight="3"
paddingTop="3"
paddingBottom="3"
backgroundColor="#FFFFFF"
backgroundAlpha="0.8"
borderStyle="solid">
<mx:Image id="labelIcon" source="{data.icon}"/>
<mx:Label id="catagory" text="{data.catagory}"/>
</mx:Module>