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