ByteArray example
We have created a simple PyAMF example for the ByteArray class in ActionScript which provides methods and properties to optimize reading, writing, and working with binary data. The PyAMF equivalent of this class is also called ByteArray that provides the same basic functionality.
This example demonstrates how to:
- Create a webcam snapshot and capture the BitmapData with Flex
- Wrap the image data with the ByteArray class and send it to a PyAMF remoting gateway
- Use Python to write the JPG file to disk
- Run a simple webserver for static content that serves the JPG files
- Use Flex to load the JPG and display it in the application
You can try the online demo below and browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself on the wiki page.