MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuale Utente Pagina 49

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 148
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 48
"off”
horizontalAlign="center">
<mx:Image width="75" height="75"
source="{data.thumbnail.url}"/>
<mx:Text text="{data.credit}"/>
</mx:VBox>
5. Using the Outline view, locate the TileList component
in the FlickrRIA.mxml template.
6. Delete the code for the itemRenderer, Component, and
VBox components.
7. Add the attribute itemRenderer to the TileList compo-
nent with a value of FlickrThumbnail. The completed
code is shown in Example 3-20.
Example 3-20. Referencing the itemRenderer
<mx:TileList width="100%" height="100%"
dataProvider="{photoFeed}"
itemRenderer="FlickrThumbnail">
</mx:TileList>
8. Compile and run the application.
At this point, you should see something very similar to what
you had when you created the inline component itemRenderer.
The final code for FlickrRIA.mxml is shown in Example 3-21.
Example 3-21. FlickrRIA.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundGradientColors="[0xFFFFFF, 0xAAAAAA]"
horizontalAlign="left"
verticalGap="15"
horizontalGap="15">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var photoFeed:ArrayCollection;
private function requestPhotos():void {
photoService.cancel();
A Flickr Viewer | 33
Vedere la pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 147 148

Commenti su questo manuale

Nessun commento