The problem lies in the fact that BitmapData is not serializable in AMF3.
What you can do is:

Extend the BitmapData class and add a line like this in the top class
definition:

[RemoteClass(alias="package.ClassName")]

Make sure your new class has no arguments in the constructor and that all
the data you want to pass along is available through public properties.

What might work in case of BitmapData is the getPixels method. This will
give you a ByteArray containing all pixel information. Send that ByteArray
over the LocalConnection and at the receiving end use setPixels.

To test your solution you can use the following code:

var ba:ByteArray = new ByteArray();
ba.writeObject(myData);
ba.position = 0;

var resultData:TypeYouAreExpecting = ba.readObject() as TypeYouAreExpecting;


I hope this helps.


Greetz Erik

Reply via email to