The following example displays the gpUrlLoader Class with an option to load a text file. Add the event listener, then call the init method with the url and the load type.
Note: The using a type of 'text' can also be used to load an Html file
var tArea:TextArea = new TextArea();
tArea.verticalScrollPolicy = ScrollPolicy.OFF;
tArea.setSize(400, 400);
tArea.move(0, 0);
addChild(tArea);
var ldr:gpUrlLoader = new gpUrlLoader();
ldr.addEventListener(Event.COMPLETE, textLoaded);
ldr.init('my_html.html', 'text');
function textLoaded(event:Event):void {
tArea.text = ldr.getText();
}
For documentation about the gpUrlLoader AS3 Class, view the blog post.