A couple of weeks ago a former colleague of mine asked me if it would be possible to integrate the barcode scanner application into his application which does not use any Java.

Well, of course this is possible! Flex can call Javascript methods given in the surrounding HTML so I created the Barcode Scanner v0.2 which just calls a Javascript method after barcode recognition.
Of course I didn't invent the wheel again and enhanced the already existent application. The recognition engine still uses the ZXing library to do the base barcode recognition.

(click here to see the running application)

While testing the first version of Barcode Scanner v0.2 my colleague reported some serious problems with the recognition rate. I owe a webcam including autofocus but if someone uses a fixfocus webcam the barcode becomes blurred and the recognition does not work.

My attempt to fix this issue was to implement a digital zoom to the application. I hope this helps to increase the recognition rate. Maybe you can drop me a line if the zoom helped?

If the recognition was successful the Flex application calls the Javascript method which opens an altert showing the detected barcode number. In an AJAX application a backend call could be triggered to run a kind of price comparation or whatever ;)

As you can see it is not necessary to have a Java backend to integrate Flex into your application.