我在一个星期的示例中遵循了flex,使用了将XML数据与XML节点集配对的下拉菜单。
对于我正在创建的项目,我只是将只包含一个节点的XML文件拉入到我的应用程序中。
所以我的问题是,我如何实现这个目标?
我正在使用httpservice并将数据提取出来,但目前唯一可行的方法是使用
<s:DropDownList>
我的代码如下:
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:HTTPService id="channelList"
url="http://www.spriing.dev/videolist/createxml.php"
showBusyCursor="true">
</s:HTTPService>
</fx:Declarations>
<s:Group>
<mx:Image id="backgroundImg" source="{channelSelection.selectedItem.background_image}" width="100%" height="100%" scaleContent="true"/>
</s:Group>
<s:Group>
<mx:FormItem label="Select Your Channel : ">
<s:DropDownList id="channelSelection" dataProvider="{channelList.lastResult.channels.channel}" labelField="name" width="196"/>
</mx:FormItem>
<s:Label text="{channelSelection.selectedItem.name}" x="0" y="45" width="331"/>
<s:Label text="{channelSelection.selectedItem.description}" x="0" y="72" width="331"/>
<mx:Image source="{channelSelection.selectedItem.logo}" x="2" y="95" />
</s:Group>
提前多谢……