PDA

View Full Version : BitmapData through Localconnection



sparkdemon
February 17th, 2009, 03:49 AM
hi

can anyone tell if how i can pass a bitmap data through a local connection in as3.0 and get it on the other end intact ? example is appreciated.

Krilnon
February 17th, 2009, 03:55 AM
There is a 40 kilobyte limit to the amount of data you can pass as parameters to this command. If send() throws an ArgumentError but your syntax is correct, try dividing the send() requests into multiple commands, each with less than 40K of data.

That might be your problem. Or, it might be that you'll have to find some other form of data to send, if for some reason BitmapData instances won't send.

I don't quite have enough time to make an example tonight, but it shouldn't be too complicated to do, so I would recommend trying it yourself if the info in my post helps at all.

wvxvw
February 17th, 2009, 05:36 AM
Only if you use getPixels() and send that bytearray. On the other side you'll need to restore the bitmap from that array, though, 40Kb would make a bitmapdata only a bit smaller than 100x100 pixels...

.ral:cr
February 17th, 2009, 06:08 AM
you could send each line separately, or more lines at once.