[Flashr] flashr wiever getting photoset Photos
Filippo Zaffini
fil.zaf at gmail.com
Wed May 9 06:08:59 EDT 2007
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>, 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/flashr_osflash.org/attachments/20070509/ea7b3cb8/attachment.htm
More information about the Flashr
mailing list