I’m using amfphp for remoting and I’ve created a class that extends NetConnection to help out with this. I want to be able to track when connections are made and other events so I can play a cursor animation when things are loading. I’ve created an event listener for NetStatusEvent inside the class but it doesn’t seem to ever get triggered even though the code obviously makes a connection and works. Anyone else had a problem with this or am I doing something wrong?
package
{
import flash.net.NetConnection;
import flash.net.ObjectEncoding;
import flash.events.NetStatusEvent
public class RemotingConnection extends NetConnection
{
public function RemotingConnection()
{
addEventListener(NetStatusEvent.NET_STATUS, netStatus_Handler);
objectEncoding = ObjectEncoding.AMF0;
connect("/flashservices/gateway.php");
}
public function netStatus_Handler(e:NetStatusEvent)
{
trace(e.info.code);
}
}
}