1

我一直试图让 lastfm api 在 flash builder 中工作。作为一个测试,我一直在尝试从大肆宣传的乐队中接收个人资料图像。

我可以发送请求,但我无法获取正确的网址。

现在我只是声明了一个静态 url,看看它是否有效,它确实有效(参见下载链接中的完整代码):

var api_selectedPhoto:String = "http://userserve-ak.last.fm/serve/252/70775172.jpg";

            return api_selectedPhoto;

无论如何,我当前的 XMLListCollection 是 myRequest.lastResult.artists.artist,这是我从调试器中提炼出来的:顺便说一句,不使用 lfm 标记是否正确?

(我在这里很新,还不允许使用图像,所以我只会发布图像的链接) http://img205.imageshack.us/img205/2497/api3.png

这就是我尝试在中继器内的图像中添加个人资料图片的网址的方式:

<mx:Repeater id="lastfmCollection" dataProvider="{myRequest.lastResult.artists.artist}">
            <s:Label text="{haalChart(lastfmCollection.currentItem)}"/>
            <s:Image id="fotoKlein"
                     source="{haalChart(lastfmCollection.currentItem)}" 
                     width="80" height="80"
                     scaleMode="stretch"/>
        </mx:Repeater>

重点还在于 xml 中有 5 个图像——标签,每个标签都有一个从小到大的不同“大小”参数:

<image size="small">
    imageurlhere
</image>

<image size="medium">
    http...
</image>

现在,我需要知道如何将中等大小的图像输入我的转发器。我已经尝试了几天,但我被卡住了。

这是完整的代码:

http://shortText.com/b0HlGpu

任何帮助是极大的赞赏!

4

0 回答 0