MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuale Utente Pagina 41

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 148
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 40
that the HTTPService generates. You can see this in Ex-
ample 3-5.
Example 3-5. The second import statement
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
]]>
</mx:Script>
4. Create a bindable private variable named photoFeed of
the ArrayCollection class after the import statement in
the mx:Script block. The photoFeed ArrayCollection is
populated with the HTTPService response data. Exam-
ple 3-6 shows the completed script.
Example 3-6. The completed script
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var photoFeed:ArrayCollection;
]]>
</mx:Script>
With the bindable XML variable created, it’s time to create the
Submit button click handler, and send the HTTPService request
and keywords to the Flickr API:
1. Using the Outline view, locate the Button component in
the HBox component. Clicking the Button component in
the Outline view locates the Button component code in
Source mode. This is shown in Figure 3-6.
A Flickr Viewer | 25
Vedere la pagina 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 147 148

Commenti su questo manuale

Nessun commento