MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manual do Utilizador Página 41

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 148
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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
Vista de página 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 147 148

Comentários a estes Manuais

Sem comentários