3

I'm trying to get the page source of a url, like https://plus.google.com/+odesk

I'm getting following error:

Error #2032: Stream Error. URL: https://plus.google.com/+odesk

Here is my code I'm using:

private var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(Url);

        //*** 60 second's timeout **
        request.idleTimeout = 120 * 1000;

        try {
            loader.addEventListener(Event.COMPLETE, completeHandler);
            loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
            loader.load(request);               
        }catch (error:Error)
        {
            trace(error.message);
        }

public function completeHandler(event:Event):void
    {
        loader = URLLoader(event.target);
        trace(loader.data);
    }
public function ioErrorHandler(event:IOErrorEvent):void 
    {

    }

Please help me.

Anil
  • 2,539
  • 6
  • 33
  • 42
waghekapil
  • 321
  • 1
  • 5
  • 22
  • 1
    Tried your code in my Flash CC 2014 environment. What isn't divulged in your post is that you are building an Adobe Air Application. I figured that out because the `idleTimeout` property is only available for applications that will be using the Adobe Air Runtime. Needless to say, after doing some google searching, this appears to be a bug with the Adobe Air Player which just hasn't been fixed since 2010! [https://forums.adobe.com/thread/766762?start=0&tstart=0](https://forums.adobe.com/thread/766762?start=0&tstart=0). I suggest filing a bug report with Adobe. – Anil Jan 29 '15 at 17:26

0 Answers0