It was a bitch to get FileReference working as I wanted it to (look ma, no sessions!), but it was well worth the effort. The sample uses an authentication-token based system instead of the less secure hack of tacking the session ID on to the request URL method (yuck!)
The example demostrates File Upload via File Reference, outputting an image via Python/webapp and both sending and returning images as ByteArrays from webapp.
The PhotoCropper component lets you upload photos, crop them, and rotate them. I started building it by expanding on Arpit Mathur's ScrollImage component (thanks, Arpit!) :) It's not complete yet but it is functional. Specifically, I don't like how it zooms and a future update will handle that. If you notice any issues, please do let me know in the comments so I can tackle them.
The updated ScrollImage class includes the following features:
- Correctly scrolls both zoomed in (<1) and zoomed out (>1) content.
- Correctly frames scrolled content so that no whitespace shows.
- Supports the loading of images via the load() method.
- Applies smoothening to the bitmap when zoomed in/out (not when at 100%).
- Implements "natural" click and drag scrolling (reversed).
- Image does not get stuck to the sides when user keeps scrolling after an edge has been reached.
- Component displays the hand cursor when over the image.
- Allows rotation of the image.
- Provides a ByteArray snapshot of the image.
I also made use of Joel Connect's FlexMatrixTransformer class (thanks, Joel!) :)
Remember that The GAE SWF Project is completely open source so you can grab the source code and use it to build your own applications (have fun!)
Getting started is as easy as 1,2,3:
- Download Google App Engine and install it.
- Download The GAE SWF Project and unzip it.
- Navigate to the folder you unzipped it to in Step 2, and start the Development Web Server by typing
./startin Terminal. Go to http://localhost:8080 to see your local version of The GAE SWF Project and start hacking!
(The above instructions are for OS X, please adapt as necessary for your platform.)
The features I'm spiking out and sharing with you in The GAE SWF Project are the ones I'm using to build the web application for the Singularity Web Conference. Expect some updates on that front in the coming days. I am going to release the Singularity app and open ticket sales as soon as the core features are in place.
Also expect some more cool Singularity-related speaker and sponsor updates this week :)