[Flashr] Tag Recent Photos display in the movie clip ...

Doug Marttila dmarttila at gmail.com
Fri Feb 16 13:33:22 EST 2007


Hi Catherine,

I'm glad it worked. Unfortunately, there is no way to add pictures to the
slide show once it is going. At least no easy way. It expects a list of
image urls at the beginning and then it does the rest.

So, what you could do is make a request for "car". Then when you get back
the result, make a request for "red". etc. Each time adding the returned
Photo object to an array. When you have gone through all your tags, you
would create the slide show.

It's not the best solution - obviously you would want a picture to appear as
soon as possible - but, that would be the easiest.

I don't have time to test, but this might work - replace the two methods w.
the code below. And add the two variables

good luck

d

private function init(apiKey : String, tags:Array, user : String) : Void {
        _flickr = Flickr.getFlickr();
        _flickrResponseListener = new FlickrResponseListener();
        var myClass:FlickrPhotoGetter=this;
        _flickrResponseListener.onError = function(n : Number) {
            myClass.gotFlickrError();
        };
        _flickrResponseListener.onPhotosSearch = function(photos:Array,
rs:ResultsSet) {
            myClass.receivedPics(photos);
        };
        _flickr.apiKey = apiKey;
        //
        this.tags=tags;
        slideList=[];
        getPhotosByTag(user, [this.tags.pop()], 1);
    }
    private var slideList:Array;
    private var tags:Array;


public function receivedPics(photos:Array) : Void {
         var len:Number=photos.length;
         var i:Number;
         var r:Photo;

         var image:String;
         var url:String;
         for ( i = 0; i < len; i++) {
             r=photos[i];
             //gets a very large picture...
             //image=r.originalUrl;
             image=r.mediumUrl;
             url=r.photoPageUrl;
             slideList.push(new OSlideData(image, url));

         }
         if (tags.length==0){
        var eO:EPicsReceivedObject=new EPicsReceivedObject(this,
'picsReceived', slideList);
        dispatchEvent (eO);
        }else{
            getPhotosByTag(user, [this.tags.pop()], 1);
            }
    }

On 2/16/07, cath ramus <cath.ramus at gmail.com> wrote:
>
> cool ;-)
> Thank you it s working.
> It gives one picture for one tag or for a combination of tags.
>
>
> Is there a way to have the slideshow for a succession of tags ... and not
> for a combination of tags .
> because right now if i type var tags=['car', 'red']; , i m going to have
> only one picture for a red car.
>
> Is there a way to have a succession of pictures for the listed tags :
> first slide for "car"  and the seconde slide for "red", ....
>
> Does this program allow this feature with a slight modification ?
>
>
> Thank you for your help.
> catherine
>
>
>
> On 2/16/07, Doug Marttila <dmarttila at gmail.com> wrote:
>
> > Hi Catherine,
> >
> > You need to change the file FlickrPhotoGetter to get photos from all
> > users.
> >
> > Go to line 55 and replace
> >
> > "getPhotosByUser(user, tags, 1);"
> >
> > with
> >
> > getPhotosByTag(tags, 1);
> >
> > I should change the code so that it checks for whether a user is entered
> > or not. But, not sure when I'll get to it.
> >
> > Also if you only want 1 photo change line 41
> >
> > from
> >
> > private var howManyPhotosToGetPerCall:Number=500;
> >
> > to
> >
> > private var howManyPhotosToGetPerCall:Number=1;
> >
> > Good luck,
> >  Doug
> >
> > _______________________________________________
> > Flashr mailing list
> > Flashr at osflash.org
> > http://osflash.org/mailman/listinfo/flashr_osflash.org
> >
> >
>
> _______________________________________________
> Flashr mailing list
> Flashr at osflash.org
> http://osflash.org/mailman/listinfo/flashr_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/flashr_osflash.org/attachments/20070216/7da01182/attachment.htm


More information about the Flashr mailing list