0
votes

I seriously need help with Action Script 3.0 :S . The language is totally new to me.

I'm trying to send the Abraham's Twitter OAuth result from PHP to AS3 and manipulated from there.

When my PHP echoes/sends the OAUTH Twitter JSON back to AS3 I get this error:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: /my/php/link/here at AS3PHPTesting02_fla::MainTimeline/frame1()

What I'm trying to do is just to see the results in AS3.

What I used inPHP: echo "returnData=".$result ;

I used: var jsonTwitter:JSON = e.target.data or `data.someparam

I hope someones could guide me. I know I'm doing something very dump.

1

1 Answers

0
votes

That errors means you're not handling an IOErrorEvent, which is dispatched generally when you're trying to load something that does not exist. For example, try run this and you'll get the same error:

var req:URLRequest = new URLRequest("nonexistantfile.txt")
var ldr:URLLoader = new URLLoader(req);

You can avoid the error by attaching an event listener to the URLLoader that will manage an IOErrorEvent:

ldr.addEventListener(IOErrorEvent.IO_ERROR, error);
function error(e:IOErrorEvent):void
{
    trace("There was an error!");
}

But the real problem you're having is that the path you're using in your URLRequest is incorrect.