
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
Kommentare zu diesen Handbüchern