[Flashr] tag search results in slideshow

Doug Marttila dmarttila at gmail.com
Fri Feb 2 12:38:50 EST 2007


Hi Gloria,

I just posted source for connecting a flash slide show to flickr...

http://www.forestandthetrees.com/mashupTalk/mashupCodeExample/index.htm

Take a look at the FlickrPhotoGetter class. and the getPhotosByTag method.

The source should basically do what you want.

Good luck

Doug

On 2/2/07, gloria kao <gloriakao at gmail.com> wrote:
>
> Hi, Kevin/ other experts:
>
> I'd like to build an extended application based on your simple tag search
> example.
> The temporal goal is to show, say 500 photos of specific tag from Flickr,
> with each photo showing 5 seconds on the screen.
>
> The first problem is it seems that sometimes(?) those requested results
> are the same.
> For example, when I call _flashr.photosSearch({tags:dog, per_page:10})  50
> times, with requesting 10 photos each time,
> the 10 photos returned remain the same in different runs. How could I
> prevent this situation?
> Because I want to show different photos over time, not repeating the same
> photos.
> If I request all 500 photos and save those in a local array in Flash, then
> it may be too heavy for Flash? (I request normal size photos, not just
> thumbnails)
>
> The second question is how to make a photo staying shown for 5 seconds and
> then move onto the next one?
> I have tried to use the following code (in this example, I only request
> one photo each time and there are 4 requests in total)
> function onPhotosSearch(rs:ResultsSet)
>     {
>        var thisPhoto:Photo = rs.photos[0];
>        var show_interval:Number = setInterval(showImage, 5000, thisPhoto);
> //showing the current photo for 5 seconds
>            if (_numRequests < 4)
>             {                doSearch(SEARCH_TAG);    //searching for next
> photo
>             }
>             else
>             {
>
>                 trace("\n Requesting number is out of limit");
>                 clearInterval(show_interval);
>             }
>    }
>  I knew something is wrong because it didnot work the way I want, but I
> don't know how to fix it.
> I realized that I passed the same "thisPhoto" in setInterval(), so in
> every 5 seconds it shows the same photo.
> (for now I only know 2 approaches to show something for certain duration-
> onEnterFrame and setInterval )
> So, the question will be is it possible to pass a dynamic variable to
> setInterval()?
> Or I am in the wrong direction to make those photos shown in slideshow
> presentation?
> (Maybe using some for-loop to read a photo from an arrary each 5 seconds,
> but the question remains the same-
> how to let some action stays for certain duration?)
>
> Please guide me a way. Thanks a lot.
>
> Gloria
>
> _______________________________________________
> 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/20070202/57acc23b/attachment.htm


More information about the Flashr mailing list