forked from: flash on 2010-10-24
♥0 |
Line 30 |
Modified 2010-10-30 23:40:26 |
MIT License
archived:2017-03-20 02:11:52
ActionScript3 source code
/**
* Copyright kt3k ( http://wonderfl.net/user/kt3k )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/uwsO
*/
// forked from kt3k's flash on 2010-10-24
package {
import flash.net.*;
import flash.text.*;
import flash.events.*;
import flash.display.*;
[SWF(
width = 465,
height = 465,
framerate = 60,
backgroundColor = "#ffff00"
)]
public class A extends Sprite {
private var tf:TextField = new TextField;
private var xml:XML;
public function A() {
this.init();
}
public function init():void {
this.tf.autoSize = "left";
this.addChild(tf);
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComp);
loader.load(new URLRequest('http://penv.org/echo?id=kt3k'));
}
public function onComp(e:Event):void {
this.xml = XML(URLLoader(e.target).data);
this.tf.appendText(this.xml.children().children());
}
}
}