Sep 10
Putting FlexPaint on Rails
I just got done adding another sample app to the Flex RoR SDK that I have been working on with Mike Potter. Basically, all I did was take the FlexPaint app created by James Ward and replace the Java back end with a Ruby on Rails back end. I also added a simple interface for adding an image to the canvas (see below), so that you can draw on it. This sample app uses both WebORB and regular ole’ HTTP calls to integrate Flex with Rails.
Â

Â
Â
Credits:
FlexPaint was originally created by James Ward.
The JPEG encoder was written by Tinic.
I would also like to thank Harris Reynolds at the midnight coders for his help with getting this working (in particular, for pointing me to the binary_reader class).
Â

September 15th, 2008 at 1:29 am
Derek,
I am not a Ruby developer, so I couldn’t run your app, but see the code. I tried to add this lines to my app, which is really similar to your example, but none image is drawn in the canvas. I couldn’t realize why.
Thanks in advance.
some example of my code according to your example,
var img:Image=new Image();
img.source=”asets/camiseta1.JPG”;
var myBitmapData:BitmapData = new BitmapData(200, 200);
canvas.graphics.beginBitmapFill(myBitmapData);
myBitmapData.draw(img);
canvas.graphics.endFill();