The problem was when building the class I took for granted that NetStream referenced against the client object and invoked the callback function from the object when a callback took place. But the fact is that when you assign a client object to netstream it saves a reference to the callback function, not the client object itself. So it was clear why my class didnt work.
So I patched it up with the proxy implementation getProperty (it looks a bit hackish but it does the trick).
flash_proxy override function getProperty(name:*) : *
{
var qName:QName = name as QName;
return function ( ...args ) : void
{
flash_proxy::callProperty( qName, args[0] );
}
}
I also noticed that in my usage example I used an object instead of the NetStreamClientEvent. So this is how you "really" use it.
// create a instance
client = new NetStreamClient();
// assign the client
netStream.client = client;
// then just add listeners to the client
client.addEventListener( NetStreamClientEvent.CUE_POINT, client_cuePointHandler );
// an example of the handler function
function client_cuePointHandler ( event:NetStreamClientEvent ) : void
{
// the info object holds the original data
var info:Object;
info = event.arguments[0];
trace( [info.name, info.time, info.cuetype] );
}
View the class below: