In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: 適当にDeliciousのRSSを取得してみた。

// forked from paq's 適当にDeliciousのRSSを取得してみた。
package {

	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.display.MovieClip;
	import flash.text.TextFormat;
	import flash.text.TextField;
	import flash.events.*;
        import flash.system.Security;

	public class Main extends MovieClip {

		private var xmlloader:URLLoader;
		private var xml:XML;
		private var txtField:TextField;
		private var il:XMLList;

		public function Main():void {
                        xmlloader = new URLLoader();
			xmlloader.addEventListener(Event.COMPLETE, onLoaded);
			xmlloader.load(new URLRequest("http://feeds.delicious.com/v2/rss/?count=15"));

			var txtFormat:TextFormat = new TextFormat();
			txtFormat.color = 0x666666;
			txtFormat.leftMargin = 20;
			txtFormat.font = "arial";

			txtField = new TextField();
			txtField.width = 465;
			txtField.height = 465;
			txtField.wordWrap = true;
			txtField.selectable = true;
			txtField.multiline = true;
			txtField.defaultTextFormat = txtFormat;

			addChild(txtField);
		}
		public function onLoaded(e:Event):void {

			var xml:XML = new XML(e.target.data);
			var il:XMLList = xml.channel.item;

			for (var i:uint = 0; i < il.length(); i++) {

				txtField.appendText(il.title[i] + "\n" + il.link[i] + "\n\n");


			}
Wonderfl.capture(stage);
		}

	}

}