
attribute with a value of 75. The itemRenderer passes
values to the Image component through the Image com-
ponent’s data property. Add a source with a value of
{data.thumbnail.url} to the Image component to popu-
late the image. The code is shown in Example 3-16.
Example 3-16. Adding the Image tag
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
<mx:Component>
<mx:VBox width="125" height="125"
paddingBottom="5"
paddingLeft="5"
paddingTop="5"
paddingRight="5">
<mx:Image width="75” height="75”
source="{data.thumbnail.url}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
7. After the Image component, create a Text component
with the text attribute having a value of {data.credit}
to display the name of the photographer. The code is
shown in Example 3-17.
Example 3-17. Adding the Text component
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}">
<mx:itemRenderer>
<mx:Component>
<mx:VBox width="125" height="125"
paddingBottom="5"
paddingLeft="5"
paddingTop="5"
paddingRight="5">
<mx:Image width="75" height="75"
source="{data.thumbnail.url}"/>
<mx:Text text="{data.credit}"/>
</mx:VBox>
</mx:Component>
A Flickr Viewer | 31
Kommentare zu diesen Handbüchern