Hi Andrew

Thanks for your inputs. The flow which I have been able to achieve till now is :

1. An MXML file which calls a JS function embedded inside it (I was able to accomplish this using Abdul Qabiz's _javascript_ injector component).

2. The JS function opens a new HTML (popup) page which inturn has Applet tags to launch the applet which does the job of scanning.

3. To upload the scanned image, I have written a servlet. The applet converts the java.awt.image object into a ByteArray and then by putting it into a serialized object, I am able to send the image to the server.

But is there a way to invoke the applet without having an HTML file to call it? That is, instead of Flex --> JS --> new HTML popup --> JTwain Applet, cant we just have Flex --> JS --> Applet ?

Your thoughts on this ?

Thanks, Rohan.


--- In flexcoders@yahoogroups.com, "Andrew Trice" <[EMAIL PROTECTED]> wrote:
>
> Rohan,
>
> We are working on similar functionality here at Cynergy Systems. You
> will need to communicate with your applet using _javascript_. Have the
> flex app call a js function that communicates with the applet, and vice
> versa. You may want to look into the Flex-AJAX bridge at labs.adobe.com
> to see how this can be done.
>
>
>
> The Flex file upload components are used to upload physical files from
> the file system to your server. Look at the FileReference class
> (http://livedocs.macromedia.com/labs/1/flex20beta3/langref//flash/net/Fi
> leReference.html).
>
>
>
> If there is no physical file, you will need to create a method that
> allows you to send the image data to the server. This could be done
> using a servlet to open a socket between your applet and your server and
> send the image data across the socket (assuming you are using a java
> backend).
>
>
>
>
>
> _____________________________________
>
> Andrew Trice
>
> Cynergy Systems, Inc.
>
> http://www.cynergysystems.com
>
>
>
> Blog: http://www.cynergysystems.com/roller/page/andrewtrice
>
> Email: [EMAIL PROTECTED]
>
> Office: 866-CYNERGY
>
>
>
> ________________________________
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of tinywhistles
> Sent: Monday, June 26, 2006 9:37 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] JTwain and Flex
>
>
>
> Hi
>
> I am using JTwain to read a scanned image from the Client UI. For this,
> I have written an applet which will detect the source attached to the
> client's machine, scan the image and show it on the user's browser.
> Then, by using Applet-Servlet communication, I need to store this image
> in the server's file system.
>
> Though this has been possible to achieve, I need to keep my UI as Flex.
> So, I need to call the applet from inside my Flex UI and render the
> image on the browser. Also I need to use the file upload functionality
> to upload this image to the server.
>
> Has anyone worked on a similar engagement? How can I use the File-Upload
> feature to upload the image(java.awt.image object) to the server from my
> Flex UI ?
>
> Inputs please.
>
> `Rohan
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to