Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with Flickr Flex Widget!

    Hi, all! I am new to Flex (currently a college student) and found a tutorial on building a Flickr widget with flex at this address: http://articles.sitepoint.com/articl...flex-widgets/1



    I have downloaded Adobe Flex Builder 3 and am working on the first part of the tutorial.



    I put this exact same code (http://www.sitepoint.com/examples/fl...flickrtag1.txt) into Flex Builder and substitute my personal API key and this is what I get: (see image).



    Any ideas as to what I am doing wrong? I feel like I am one step away from getting this right!



    I really appreciate your help!

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    First of all, convert that image to a more reasonable format. 1.3MB for that screenshot is ridiculous.

    Then, to find out what's going on setup a few debug messages to let you know of the status of the request. For example:
    Code:
    import mx.controls.Alert;
    private function onFlickrResult( event:ResultEvent ) : void {
    Alert.show('got a result');
      for each( var photo:XML in event.result..photo ) {
        var smallPhotoUrl:String = 'http://static.flickr.com/'+photo.@server+'/'+photo.@id+'_'+photo.@secret+'_s.jpg';
        var bigPhotoUrl:String = 'http://static.flickr.com/'+photo.@server+'/'+photo.@id+'_'+photo.@secret+'.jpg';
        images.push( { 
          source:smallPhotoUrl,
          bigSource:bigPhotoUrl,
          title:photo.@title,
            latitude:photo.@latitude,
            longitude:photo.@longitude
          } );
      }
      setPictures();
    }
    
    public function faultHandler(event:FaultEvent):void
    {
    	Alert.show(event.fault.faultString);
    }
    Then set the "fault" attribute in the HTTPService tag:
    Code:
    <mx:HTTPService id="flickrSearch" resultFormat="e4x" result="onFlickrResult(event)" fault="faultHandler(event)" />


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •