在 Flash Builder 中加载来自 Facebook 的图像
我正在做一个 Facebook 应用程序,我想从用户的相册中提取所有可能的图像。
我现在想做的是一个 fql 查询,这样我就可以找到属于该特定用户的所有图像。它是这样的:
protected function loadFromFacebook(event:MouseEvent):void {
var fql:String = "select src_small from photo where owner = me()";
Facebook.fqlQuery(fql, handleGetPhotosResponse);
}
private function handleGetPhotosResponse(event:Object, fail:Object):void {
if (event != null){
facebookPhotos = new ArrayCollection(event as Array);
}
}
我将这些图像存储在数组集合中,但我不知道之后如何继续。如何将这些图像加载到平铺列表或加载器中?
任何帮助将不胜感激,
谢谢
I'm doing a Facebook App where I'd like to pull out all the possible images from a user's album.
What I'm trying to do at the moment is a fql query so that i can find all the images that belong to that specific user. it goes something like that:
protected function loadFromFacebook(event:MouseEvent):void {
var fql:String = "select src_small from photo where owner = me()";
Facebook.fqlQuery(fql, handleGetPhotosResponse);
}
private function handleGetPhotosResponse(event:Object, fail:Object):void {
if (event != null){
facebookPhotos = new ArrayCollection(event as Array);
}
}
I store this images in an array collection but I don't know how to proceed after that. How can I load those images into, say, a Tile List or a Loader?
Any help would be much appreciated,
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您是一个名为“tList”的 TileList 组件,您将在 arraycollection 上执行“for 循环”并创建一个新图像,并在每次迭代时将其添加到 TileList。
Assuming you are a TileList component named 'tList', you would do a 'for loop' on the arraycollection and create a new image, and add it to the TileList on each iteration.
您应该执行一个接收结果对象和失败对象的处理程序函数。
结果对象是您通过 fql 请求的字段数组。
you should do a handler function that receive a result object and a fail object.
the result object is an array of fields that you requested with the fql.