Hi Filippo,
The problem is in this line:
var photoSetArray:Array = s.getPhotoset();
in this line, s is a Photoset object. Here is the
documentation for a
Photoset:
http://flashr.kelv
inluck.com/assets/0.5/docs/files/com/kelvinluck/flashr/core/
Photoset-as.html
Now to get the photos in the Photoset you need to call
getPhotos like this:
var photosArray:Array = s.getPhotos();
I guess that's what you want to do? The Photoset.getPhotoset
method is a
static method which returns a Photoset instance for a given
id and
probably isn't what you are looking for!
Hope that helps,
Kelvin
Filippo Zaffini wrote:
> First of all, thanks Flashr is really great
> my goal was: make a Flash gallery, that import photos
with title and
> link from flickr .
> Following the Flashr viewer example
> <http://www.kelvinluck.com/article/flashr-code-example&g
t;, I did it...and
> work...
>
> import com.kelvinluck.flickr.Flickr;
> import com.kelvinluck.flickr.FlickrResponseListener;
> import com.kelvinluck.flickr.Person;
> import com.kelvinluck.flickr.Photo;
> import com.kelvinluck.flickr.Photoset;
> import com.kelvinluck.util.LogWrapper;
> import com.dynamicflash.utils.Delegate;
> var apiKey:String = "";
> var userNsid:String = "";
> var IDSet:Number = Number;
> var page:Number = 1;
> var myTarget:MovieClip;
> var playList:Array = new Array();
> var playTitle:Array = new Array();
> var playLink:Array = new Array();
>
> function UserRecentPhotos(target:MovieClip) {
> Stage.scaleMode = "noScale";
> myTarget = target;
> var _flickr:Flickr = Flickr.getFlickr();
> _flickr.apiKey = apiKey;
>
> var _flickrResponseListener:FlickrResponseListener =
new
> FlickrResponseListener();
> _flickrResponseListener.setSuppressOutput(true);
> _flickrResponseListener.onPeopleGetPublicPhotos =
Delegate.create(this,
> onPeopleGetPublicPhotos);
> _flickr.peopleGetPublicPhotos(userNsid, null, 9,
page);
> }
> function onPeopleGetPublicPhotos(p:Person):Void {
> var photosArray:Array = p.getPhotos();
> trace (photosArray)
> }
>
> var userNsid:String = p.nsid;
> for (var i:Number = 0; i<photosArray.length; i++)
{
> var thisPhoto:Photo = Photo(photosArray[i]);
> var mc:MovieClip =
myTarget.createEmptyMovieClip("photo"+i, i);
> mc._x = 19+(i%3)*76;
> mc._y = 90+Math.floor(i/3)*76;
> // and so on, all the codelines using photo, title
and link in
> the Arrays ...
>
>
> Now I just wanna load single photoset instead of all
recentPhotos,
> passing the id of the photoset...
> I've trying adding those codelines to populate an Array
only with a
> given ID photoset's Photo of my FLickr user, but it
doesn't work:
>
>
>
>
> var mySet:Number = 0000000000000;
> var page:Number = 1;
> var myTarget:MovieClip;
> var photoSetArray:Array=new Array();
>
> function UserRecentPhotos(target:MovieClip) {
> Stage.scaleMode = "noScale";
> myTarget = target;
> var _flickr:Flickr = Flickr.getFlickr();
> _flickr.apiKey = apiKey;
> var _flickrResponseListener:FlickrResponseListener =
new
> FlickrResponseListener();
> _flickrResponseListener.setSuppressOutput(true);
> _flickrResponseListener.onPhotosetsGetPhotos =
Delegate.create(this,
> onPhotosetsGetPhotos);
> _flickr.photosetsGetPhotos(BeAngelSet);
> }
> function onPhotosetsGetPhotos(s:Photoset):Void {
> var photoSetArray:Array = s.getPhotoset();
> trace(photoSetArray);
> }
>
> ----------------
> **Error** Scene=Scene 1, layer=action, frame=1:Line 48:
Static members
> can only be accessed directly through classes.
> var photoSetArray:Array = s.getPhotoset();
>
>
> can u help me...it's just a formal error? or I have to
follow another way?
> thanks in advance
> Phi
_______________________________________________
Flashr mailing list
Flashr osflash.org
http://osflash.org/mailman/listinfo/flashr_osflash.org
|