I took another look at this because it was really bugging me!
Here's the solution I came up with.
Basically what I was doing was creating one flickrService object, then
making all my calls though that. The problem here is that the
flickrService is detached from any parameters that you pass though it
(say a photo's id number).
So one way to fix this is to create a "param" variable on the
FlickrService object: So in FlickrService.as
public var param:String;
then in the constructor:
param = new String;
You could also extend the flickrService object with your own object,
say the paramFlickrService....or something like that.
Then create a seperate flickrService object for each time you make a
call to flickr.
for instance:
for each (var p:Photo in photos)
{
var fs:FlickrService = new FlickrService
(FLICKR_API_KEY)
fs.addEventListener
(FlickrResultEvent.PHOTOS_GET_SIZES, onGetPhotoInfo);
fs.photos.getSizes(
p.id);
fs.params=
p.id;
}
finally, when the response comes through
private function onGetPhotoInfo
(event:FlickrResultEvent):void {
var fs:FlickrService = event.target as FlickrService;
trace(fs.param);
trace(mx.utils.ObjectUtil.toString(event.data));
}
you can now get the initial information that you called the
FlickrService with.
I don't know if there is a better way to do this....if anyone has any
suggestions, please post...I have some more development that I want to
do with this, but I don't want to go too far in the wrong directly
then have start all over.
Thanks!