渲染器输出不了图片

xiaoxin888888 2009-06-11 08:48:13
<mx:HBox id="latestWeather">
<mx:DataGrid dataProvider="{appModelLocator.weatherBean.imglst}">
<mx:columns>
<mx:DataGridColumn>
<mx:itemRenderer>
<mx:Component>
<mx:Image source="weather/{data.source}"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
<mx:Text id="curWeatherContent" text="数据库中当前天气是:{appModelLocator.weatherBean.weatherContent}"/>
<mx:Image source="weather/{appModelLocator.weatherBean.imglst.getItemAt(0)}" width="100" height="100"/>
<mx:HorizontalList id="curWeatherImageList" dataProvider="{appModelLocator.weatherBean.imglst}" itemRenderer="view.app.WeatherCurListItemRender"/>
<mx:List dataProvider="{appModelLocator.weatherBean.imglst}" labelField="imagePath" id="listCurWeather">
<mx:itemRenderer>
<mx:Component>
<mx:Image source="weather/{data.imagePath}"/>
</mx:Component>
</mx:itemRenderer>
</mx:List>
<mx:Repeater id="rep" dataProvider="{appModelLocator.weatherBean.imglst}" >
<mx:Image source="weather/{rep.currentItem.@imagePath}"/>
</mx:Repeater>
</mx:HBox>
看看这段代码,能够输出curWeatherContent的内容,但是无论是使用repeater或者是HorizontalList组件都无法将图片渲染出来,但是imglst是存在的,因为我用Image组件测试了一下是可以看到有图片输出的。
why渲染不出来图片
...全文
134 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
beniao277 2009-06-20
  • 打赏
  • 举报
回复
图片不出来一般都是路径问题。
herowach 2009-06-11
  • 打赏
  • 举报
回复
检查RENDERER中的路径是否正确

4,328

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧