List Info

Thread: GetTagsAsString




GetTagsAsString
country flaguser name
United Kingdom
2007-05-07 16:15:28
Hello,

I am trying to get the tags of the photo i am searching for and store them into a variable.

I understand I have to use getTags or getTagsAsString,

the problem I am having is implementing this. I do not know how to call the function,

have put our previous email correspondence at the bottom of the email..
i am understanding tags this,
_flashr.photosSearch({tags:tags, per_page:NUM_RESULTS});, but I dont see where extras comes into it, it isnt mentioned in the link you gave me,

i have discovered getTags and I am trying to use getTagsAsStrings, I have declared it at the top of the page

private var _photoResponse:Photo;

i have presumed to write this line as well

_photoResponse.getTagsAsStrings = Delegate.create(this, getTagsAsStrings);

but i do not know what else to do!

thanks a million


**********************************


Hi John,

You can pass "tags" to the "extras" parameter when you do a search:

http://flashr.kelvinluck.com/assets/0.5/docs/files/com/kelvinluck/flashr/core/Flashr-as.html#com.kelvinluck.flashr.core.Flashr.photosSearch

Then when you are looping over the photos you should be able to use Photo.getTags or Photo.getTagsAsStrings on each photo to find out what tags it has...

If you've got any further questions can you please ask them on the mailing list ( http://osflash.org/mailman/listinfo/flashr_osflash.org ) as it means the question and answer are there for other people to learn from (and you might get a quicker response!),

Cheers,

Kelvin

On Mon, 07 May 2007 16:35:43 +0100, Apache User <vitchbam.dreamhost.com> wrote:

> 0
> X-Abuse-To: abusedreamhost.com
> Name: John Wilkie
> Email: john.wilkiestudents.plymouth.ac.uk
> Subject: Getting Related Tags from an image search
> Message:
> Hi there Kelvin, First off thanks for the excellent wrapper that has helped me so much.
>
> Secondly for my project to get a good mark, i need to be able to get the tags, associated with the photo i search for using your tutorial, and store them in a variable..
>
> Please help, i understand Tag.as has something to do with it but i am unaware as of how to call the function or which particular function to call
>
> many thanks and kind regards
>
> john wilkie

john wilkie


New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
Re: GetTagsAsString
user name
2007-05-07 17:27:05
Hi John,

Try doing the search like this:

  _flashr.photosSearch({tags:tags, per_page:NUM_RESULTS,
extras:'tags'});

Then in the onPhotosSearch function you will have something
like this (untested):

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('Photo: ' + thisPhoto + ', tags:' + tags);
     }
}

Hope that helps,

Kelvin 

On Mon, 07 May 2007 22:15:28 +0100, john wilkie
<jamwilkieyahoo.co.uk> wrote:

> Hello,
>
> I am trying to get the tags of the photo i am searching
for and store them into a variable.
>
> I understand I have to use getTags or getTagsAsString,
>
> the problem I am having is implementing this. I do not
know how to call the function,
>
>  have put our previous email correspondence at the
bottom of the email..
>  i am understanding tags this,
>  _flashr.photosSearch({tags:tags,
per_page:NUM_RESULTS});, but I dont see where extras comes
into it, it isnt mentioned in the link you gave me,
> i have discovered getTags and I am trying to use
getTagsAsStrings, I have declared it at the top of the page
> private var _photoResponse:Photo;
> i have presumed to write this line as well
> _photoResponse.getTagsAsStrings = Delegate.create(this,
getTagsAsStrings);
> but i do not know what else to do!
> thanks a million
> **********************************
> Hi John,
> You can pass "tags" to the "extras"
parameter when you do a search:
> http://flashr.kelvinluck.com/asse
ts/0.5/docs/files/com/kelvinluck/flashr/core/Flashr-as.html#
com.kelvinluck.flashr.core.Flashr.photosSearch
> Then when you are looping over the photos you should be
able to use Photo.getTags or Photo.getTagsAsStrings on each
photo to find out what tags it has...
> If you've got any further questions can you please ask
them on the mailing list ( http://osflash.org/mailman/listinfo/flashr_osflash.org
) as it means the question and answer are there for other
people to learn from (and you might get a quicker
response!),
> Cheers,
> Kelvin 
> On Mon, 07 May 2007 16:35:43 +0100, Apache User
<vitchbam.dreamhost.com> wrote:
> > 0
>  > X-Abuse-To: abusedreamhost.com
>  > Name: John Wilkie
>  > Email: john.wilkiestudents.plymouth.ac.uk
>  > Subject: Getting Related Tags from an image
search
>  > Message:
>  > Hi there Kelvin, First off thanks for the
excellent wrapper that has helped me so much.
>  >
>  > Secondly for my project to get a good mark, i
need to be able to get the tags, associated with the photo i
search for using your tutorial, and store them in a
variable..
>  >
>  > Please help, i understand Tag.as has something to
do with it but i am unaware as of how to call the function
or which particular function to call
>  >
>  > many thanks and kind regards
>  >
>  > john wilkie
> john wilkie
>
>  		
> ---------------------------------
>  New Yahoo! Mail is the ultimate force in competitive
emailing. Find out more at the Yahoo! Mail Championships.
Plus: play games and win prizes.



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


[1-2]

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