views:

152

answers:

2

Hi, is it somehow possible to open a HTML popup window from within Flash and have it receive text data from Flash which should be printed ... and this all only in AS3 and Javascript (since no server-side scripting is available)?

+1  A: 

Yes, you can write a Javascript function to open the popup, and link to it via ExternalInterface.

Learn more here: ExternalInterface Adobe Docs

Jacob Relkin
Thanks Jacob, I can figure this out. But before I start hammering my own Print JS together ... maybe there is an external printing script available somemwhere already? anyone know?
sascha
A: 

I don't think ExternalInterface will help you doing this as You want to print something which is inside the flash (some textfield or may be graphics). You can use flash.priniting.PrintJob and add frames / sprites as pages to the printjob, which will then be sent to printer. And yes, there be default print pop-up whenever you call printJob.start().

bhups
thanks for the hint, but yes it does work. see here... http://cookbooks.adobe.com/post_How_to_print_in_Flex_using_browser_capabilities-11468.html ... very easy actually thnx to ext interface. ;)
sascha
Thats pretty cool :)
bhups