box-o-sand/PracticingFlex/custom-03d4-tilelist/TileListExample.mxml

39 lines
1.2 KiB
Plaintext
Raw Normal View History

2010-02-21 21:19:54 +00:00
<?xml version="1.0" encoding="utf-8"?>
<loc:TileListApp xmlns:mx="http://www.adobe.com/2006/mxml"
2010-02-21 21:33:51 +00:00
styleName="basic-app" xmlns:loc="*">
<mx:Style source="tilelist.css" />
2010-02-21 21:19:54 +00:00
<!-- photo service -->
<mx:HTTPService id="photoService"
url="http://api.flickr.com/services/feeds/photos_public.gne"
result="photoHandler(event)" />
<!-- search -->
<mx:Form>
2010-02-21 21:33:51 +00:00
<mx:FormItem label="Search Term" direction="horizontal">
2010-02-21 21:19:54 +00:00
<mx:TextInput id="searchTerms" />
2010-02-21 21:33:51 +00:00
<mx:Button label="Search" click="requestPhotos()" />
2010-02-21 21:19:54 +00:00
</mx:FormItem>
</mx:Form>
<!-- result, data is passed to the itemRenderer by Flex
through the data property -->
<mx:TileList id="mylist"
2010-02-21 21:33:51 +00:00
styleName="basic-style-list"
2010-02-21 21:19:54 +00:00
labelField="thumbnail"
dataProvider="{photoFeed}"
itemClick="showMessage(event)">
<mx:itemRenderer>
<mx:Component>
2010-02-21 21:33:51 +00:00
<mx:VBox styleName="basic-vbox">
<mx:Image styleName="basic-image"
2010-02-21 21:19:54 +00:00
source="{data.thumbnail.url}"/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
2010-02-21 21:33:51 +00:00
<mx:Text id="textMessage" styleName="basic-text" />
2010-02-21 21:19:54 +00:00
</loc:TileListApp>