3 Replies Latest reply on Jun 9, 2008 6:44 PM by Gregory Lafrance

    Basic Flex 3 Tutorial problem

    sauerwein Level 1
      I went through the basic tutorial (connecting to Flickr's data base), but I cannot run it.

      I did the tutorial called "Creating a simple RIA" on this page:
      http://learn.adobe.com/wiki/display/Flex/Getting+Started;jsessionid=0F9751262841827229F1FA 9F90E9248A

      I debugged the code, made corrections, and now it seems to be OK, but it simply won't run. The page, with label, text field and button, shows up in the browser (Firefox and Safari). FlashPlayer 9 is installed. I type a keyword (eg. "house"), clicked Search, and the Flickr thumbnail images don't show up.

      Please help! Thanks.

      Laurent

      Here's the FlickrRIA.mxml code I have:

      ********************************

      <?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.automation.codec.ArrayPropertyCodec;
      import mx.collections.ArrayCollection;
      import mx.rpc.events.ResultEvent;

      [Bindable]
      private var photoFeed:ArrayCollection
      private function requestPhotos():void{
      photoService.cancel();
      var params:Object = new Object();
      params.format = 'rss_200_enc';
      params.tags = searchTerms.text;
      photoService.send(params);
      }
      private function photoHandler(event:ResultEvent):void{
      photoFeed = event.result.rss.channel.item as ArrayCollection;
      }
      ]]>
      </mx:Script>
      <mx:HTTPService id="photoService"
      url=" http://api.flickr.com/services/feeds/photos_public.gne"
      result="photoHandler(event)"/>
      <mx:HBox width="100%">
      <mx:Label text="Search terms"/>
      <mx:TextInput id="searchTerms"/>
      <mx:Button label="Search"/>
      </mx:HBox>

      <mx:TileList width="100%" height="100%"
      dataProvider="{photoFeed}"
      itemRenderer="FlickrThumbnail">

      </mx:TileList>
      </mx:Application>

      ******************************

      Anything wrong with it?
      What could the problem be?