flickr+Yahoo!Pipes(xml)2
http://pipes.yahoo.com/pipes/pipe.info?_id=bd89377e6444cfe6083bad4904c60b79
http://d.hatena.ne.jp/ku-KiKi/20090524/p1
/**
* Copyright umhr ( http://wonderfl.net/user/umhr )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/qV6T
*/
/*
http://pipes.yahoo.com/pipes/pipe.info?_id=bd89377e6444cfe6083bad4904c60b79
http://d.hatena.ne.jp/ku-KiKi/20090524/p1
*/
package {
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import com.adobe.serialization.json.JSONDecoder;
public class Main extends Sprite{
public function Main() {
var myURLLoader:URLLoader = new URLLoader();
myURLLoader.addEventListener(Event.COMPLETE, onComplete);
myURLLoader.load(new URLRequest("http://pipes.yahooapis.com/pipes/pipe.run?_id=bd89377e6444cfe6083bad4904c60b79&_render=rss&loc=tokyo&num=20&q=flower"));
}
private function onComplete(e:Event):void {
var myXML:XML = new XML(e.currentTarget.data);
default xml namespace = new Namespace("http://search.yahoo.com/mrss/");
//default xml namespace = myXML.namespace("media");
for (var i:int = 0; i < 4; i++) {
var myLoader:Loader = new Loader();
myLoader.load(new URLRequest(myXML.channel.item[i].group.content.@url));
myLoader.x = myLoader.y = i*100;
addChild(myLoader);
}
}
}
}