[Flashr] Where's the method?

Leopold Hastreiter poldi at ymail.com
Mon Feb 2 07:25:09 PST 2009


Never mind, I just noticed publish settings were set to Flash 6. Changed it to 8 and everything works fine now (how emberassing ...)




________________________________
Von: Leopold Hastreiter <poldi at ymail.com>
An: flashr at osflash.org
Gesendet: Montag, den 2. Februar 2009, 10:35:59 Uhr
Betreff: [Flashr] Where's the method?


Hi guys,

I just recently started playing with Flashr (and I'm not really an Actionscript pro) and am trying to get Kelvin's "UserRecentPhotos" script to work with 0.5, but somehow the "method" seems to be missing and I'm getting this error message in the log:

*DEBUG*:"Flashr.callMethod : http://api.flickr.com/services/rest/?api_key=6fd22d6b12538fa9af1b17c526b14552&page=1&per_page=16&user_id=9084993@N05&"
*DEBUG*:"Flashr.onAPIResponse received XML: <?xml version="1.0" encoding="utf-8" ?><rsp stat="fail"><err code="112" msg="Method &quot;unknown&quot; not found" /></rsp>"

Please find my script below. Any idea whats going on? Many thanks in advance,

Leopold

import com.kelvinluck.flashr.core.Flashr;
import com.kelvinluck.flashr.core.FlashrResponse;
import com.kelvinluck.flashr.core.Person;
import com.kelvinluck.flashr.core.Photo;
import com.kelvinluck.util.LogWrapper;
import com.dynamicflash.utils.Delegate;

class com.leopold.GetMyPhotos 
{
    
    var apiKey:String = "6fd22d6b12538fa9af1b17c526b14552";

    var userNsid:String = "9084993 at N05";

    var _target:MovieClip;
    
on GetMyPhotos(target:MovieClip)
    {
        Stage.scaleMode = "noScale";
        LogWrapper.getInstance().init();
        LogWrapper.getInstance().addTracePublisher();
        
        _target= target;
        var _flashr:Flashr = Flashr.getFlashr();
        _flashr.apiKey = apiKey;
        var _flashrResponse:FlashrResponse = new FlashrResponse();
        _flashrResponse.setSuppressOutput(true);
        _flashrResponse.onPeopleGetPublicPhotos = Delegate.create(this, onPeopleGetPublicPhotos);
        _flashr.peopleGetPublicPhotos(userNsid, null, 16,1);
    }

    function onPeopleGetPublicPhotos(p:Person):Void
    {
        var photosArray:Array = p.getPhotos();
        var userNsid:String = p.nsid;
        for (var i:Number=0; i<photosArray.length; i++) {
            var thisPhoto:Photo = Photo(photosArray[i]);
            var mc:MovieClip = _target.createEmptyMovieClip("photo"+i, i);
            mc._x = 1 + (i%4) * 76;
            mc._y = 1 + Math.floor(i/4) * 76;
            mc.createEmptyMovieClip("jpgHolder", 1);
            mc.jpgHolder.loadMovie(thisPhoto.thumbnailUrl);
            mc.photo = thisPhoto;
            mc.onPress = function()
            {
                getURL(this["photo"].photoPageUrl, "_blank");
            };
        }
    }
    public static function main():Void
    {
        var u:GetMyPhotos = new GetMyPhotos(_root);
    }
    public function toString():String
    {
        return "[com.leopold.GetMyPhotos]";
    }
}


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/flashr_osflash.org/attachments/20090202/35778d38/attachment-0001.html>


More information about the Flashr mailing list