[flexcoders] Applet running on Flex (production version)

2006-07-06 Thread tinywhistles

Hi

In my application I have Flex as the UI. Each of the client systems have
a scanner attached. The requirement is that on hitting the scan button
on the Flex UI, I should be able to scan the image and display it on the
same Flex window.

In this I have been able to achieve the following :

On the hit of Scan button, my MXML calls an inline JavaScript
function, which inturn opens up a new HTML window. The HTML page calls
the applet which does the actual scanning. After scanning, the image is
rendered in the HTML window itself. My concern is that I do not want to
use an HTML page because taht ways I am taking the user out of the RIA
look-n-feel. And as Flex does not provide APIs to read images from
scanners, I need to use the applet as well.

Can someone please tell me how to display the image in a Flex window,
considering the image is coming as an output from an Applet? Or, is
there a way to run the applet inside a Flex window totally? I have tried
calling the Applet from the JS function directly, but it doesn't work.

Pls give your inputs.

Thanks
Rohan







 Yahoo! Groups Sponsor ~-- 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [flexcoders] Applet running on Flex (production version)

2006-07-06 Thread John Dowdell
I think that project description may boil down to the question How can 
I display a Java applet within a SWF in my audience's various browsers? 
(If I'm understanding the wrong question from the project description, 
then please advise.)

If I'm looking at the correct question, then there is no direct answer, 
because web browsers can allocate a rectangular area of the screen to 
browser extensions like plugins and applets. Browser technology does not 
offer a way to literally put an applet inside a plugin's display.

That said, though, there may be ways to get an effect similar to what 
you wish:

a)  You could *try* WMODE overlay support, but this varies with browser, 
and even when it worked would probably be a little strange, to try to 
overlay an applet atop a plugin.

b)  Another technique to give the appearance of an applet within a SWF 
would be to put a frame of SWF around the applet: four individual SWFs, 
placed seamlessly together, with the applet in the center. That's five 
engines running simultaneously, though, and could also be strange in 
some browsers.

c)  Other possibilities would depend on what communication abilities 
your scanning applet possesses -- it could send image data to the server 
which is then dynamically loaded by a single SWF, or might be able to 
pass numeric image data to the browser which then passes it to the SWF 
which then uses imaging techniques to create the image from the data, etc.

I'm guessing we're talking about getting image data from a desktop 
photoscanner here, where the user might put in a photo and see the 
material in their web browser. If so, then it seems simple to just use 
the applet in the regular way, either in the same HTML page or in its 
own popup window... most users would find it natural to see and approve 
a photoscan in a new window, I think. But at this point I can't offer 
design tips on the project; all I know is that browsers do not tend to 
let you display an applet within a plugin. Maybe one of the above paths 
could lead you where you wish...?

jd




-- 
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.


 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~- 

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Applet running on Flex (production version)

2006-07-06 Thread Jeremy Lu




One possible solution is to serve the image stream from applet thru a
socket, flex receive the stream and save in a ByteArray, then you could
display the image from ByteArray.


Jeremy.


Can someone please tell me how to display the image in a Flex window,
considering the image is coming as an output from an Applet? Or, is
there a way to run the applet inside a Flex window totally? I have tried
calling the Applet from the JS function directly, but it doesn't work.

Pls give your inputs.

Thanks
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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___