FlashComGuru Home InfluxisCDNImediaseeUvault
                                                                                       Forum Index | Active Topics | Register
                                                                                                          List Overview | List Archives
                                                                                                                           About this site | Advertise
 

home

Adobe AIR (11)
Applications (40)
Books & Training (11)
Collaboration (18)
Components (10)
Events (80)
Flash Player (35)
Flex (39)
FMS (110)
General (123)
Hosting (6)
Jobs (17)
Off topic (36)
OSMF (3)
Press Releases (23)
Site Check (11)
Tools (53)
Videos & Players (74)

Follow me on Twitter

 
This would have been neat. I tried to grab a bitmapimage from a live camera source

mycam = Camera.get();
vid.attachVideo(mycam);

bitmap_1 = new BitmapData(160, 120, true, 0);   
dest.attachBitmap(bitmap_1, this.getNextHighestDepth(), "auto", true);
bitmap_1.draw(vid);

which worked fine.

Next I wanted to see if I could clone that bitmapobject

var clonedBitmap = bitmap_1.clone();"auto", true);

and then send it via SharedObject.send to another connected client

so.send("sendBmp", clonedBitmap );

Unfortunately while I can send 'normal' objects as well as strings and so on this didn't work with a BitmapObject, it always traced undefined once received.

Anyone got any other ideas of how this could be done - if it can be done at all?

Comments
[Add Comment]
You will need to write a custom serializer/deserializer.

Or you can loop through each pixel using getPixel and send it over the wire as a long string of pixel colors.
# Posted By Guy Watson | 9/16/05 1:39 PM
I tried the getPixel/setPixel approach but that's real heavy on the system even with a relatively small graphic as you know first hand (webcam motion detection).
A custom serializer/deserializer... sounds great but I have no idea how that would be done :-)

Thanks for the comments.
# Posted By stoem | 9/16/05 2:08 PM
Yo a erializer/deserializer !
I hope you have a good processor ! :)
snapshot on FCS just run ! why use bitmapdata ?
# Posted By jeanphilippe | 9/18/05 2:03 PM
Hi stoem,

Yes you are abs right..it can not able to send bitmap data. While getpxile and setpixel working fine, but still taking time to generate bitmap not that much fast. Let me know if you want setpixel and getpixel code and also let me know if you able to find any alternative method of serializer and deserializer.
# Posted By Ritesh Jariwala | 9/19/05 3:30 PM
thanks Ritesh, please feel free to post your code here. I too have played with get/setPixel but it's obviously very slow looping over so many pixels...
# Posted By stoem | 9/19/05 3:42 PM
Hi stoem,

I had posted it on my blog http://www.actkid.com/2005/09/19/sending-a-bitmapo... let me know if you have your example up. I will also like to check it out.
# Posted By Ritesh Jariwala | 9/19/05 6:52 PM
A solution ??
You can try to use a php script to save the capture in a web server... and after you save the picture's url in a sharedObject :)
Idea and little example in sephirot's link :
http://www.sephiroth.it/tutorials/flashPHP/print_s...

PS : sorry for my english :D
# Posted By ekameleon | 9/19/05 10:44 PM