List Info

Thread: GetTagsAsString




GetTagsAsString
country flaguser name
United Kingdom
2007-05-07 21:54:20
I have done it using a bit of brain

function onPhotosSearch(rs:ResultsSet)
{
  ;   _numResults = rs.photos.length;
&nbsp; &nbsp;  for (var i:Number=0; i<_numResults; i++) {
 &nbsp; &nbsp;   ;  var thisPhoto:Photo = rs.photos[i];
 &nbsp;  var tags:Array = thisPhoto.getTagsAsStrings();
&nbsp; &nbsp;
 &nbsp; 
 &nbsp; 
 &nbsp; &nbsp; }
 &nbsp;   
&nbsp; &nbsp;  trace(tags);
&nbsp; &nbsp;  for (var nother = 0; nother < tags.length; nother++) {
 &nbsp;   trace (tags[nother]);
//

}
 &nbsp;   
&nbsp; &nbsp;  
&nbsp; &nbsp;


}

&nbsp; &nbsp;


Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your free account today.
Re: GetTagsAsString
country flaguser name
United Kingdom
2007-05-09 16:17:56
john wilkie wrote:
> I have done it using a bit of brain
> 
> function onPhotosSearch(rs:ResultsSet)
> {
>      _numResults = rs.photos.length;
>      for (var i:Number=0; i<_numResults; i++) {
>          var thisPhoto:Photo = rs.photos[i];
>     var tags:Array = thisPhoto.getTagsAsStrings();
>      }
>      
>      trace(tags);
>      for (var nother = 0; nother < tags.length;
nother++) {
>      trace (tags[nother]);
> }
> }

Hi John,

Glad you figured it out. Just to let you know that as you
have it you 
are only looping over the tags of the last photo. The
"for (var i" loop 
is running over all the photos and setting the tags variable
each time 
but then you aren't doing anything with the variable until
the loop is 
finished. I'm guessing this isn't what you want to do... You
probably 
want to do something on each Photo object with its tags...

Cheers,

Kelvin 

_______________________________________________
Flashr mailing list
Flashrosflash.org
http://osflash.org/mailman/listinfo/flashr_osflash.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )