OnImageData
Hello EveryBody,
I am facing this error, when trying to send ByteStream over RTMP:
---------> Extract for sendiing data <---
var src:BitmapData = new BitmapData(640,480,false,0x000000);
var differences:Array = mdMotionObject.extractMovingData();
var bytes:ByteArray = new ByteArray();
bytes.writeObject(differences);
ns.send("onImageData", bytes);
//ns.send("@setDataFrame","onImageData", bytes);
----------> Reading data <-------------
clientStreams[0] = new StreamClient();
ns1.play(ru);
ns2.client = clientStreams[0];
===============================
public class StreamClient
{
public function StreamClient()
{
}
public function onImageData(imageData:Object):void
{
trace("imageData length: " + imageData.data.length);
//addChild(imageloader);
}
public function onTextData(info:Object):void
{
trace("onTextData (LIB): " + info.toString());
}
public function onMetaData(info:Object):void
{
trace("onMetaData (LIB): " + info.toString());
}
public function onCuePoint(info:Object):void
{
trace("onCuePoint (LIB): " + info.toString());
}
public function onBWDone():void
{
}
}
===============================
But I am getting the above error
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onImageData. error=ReferenceError: Error #1069: Property onImageData not found on flash.net.NetStream and there is no default value.
I wish somebody comes up a near solution or an approach to solve the above problem.
Thanx.
DDPRASAD