in AS3 I'm trying to load a URL (a Yahoo address) into the application so I can process the source code and pull things out of it.
However, when I load it, or any other page, I get 0 bytes back.
Here's my current code.
private function doSearch():void {
var req:URLRequest = new URLRequest("http://yahoo.com");
var loader:URLLoader = new URLLoader();
loader.load(req);
loader.addEventListener(Event.COMPLETE, completeHandler);
}
private function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
Alert.show(String(loader.bytesTotal),"HTML", Alert.OK);
}
When this runs, all I receive is a 0 in the alert box, showing me that 0 bytes have been loaded.