Screen Capture using Flash / ASP.NET or Active X

Hi Experts,

I have a flash drawing application that needs the result screen to be captured ( like Print Screen ) and stored as JPG on the website.

I have designed this application using Flash and am looking to using ASP.NET or ActiveX to capture the screen and need this to be done for a website. I have some solutions that work offline but do not work online for websites.

Any help is appreciated.

Many Thanks

Bharat
dotsandcomsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

julianopolitoCommented:
You should do the following:

- Use BitmapData class to capture the drawing in flash. For example let's say your appp draws into a movieclip called draw_mc, then you do
var bd:BitmapData = new BitmapData();
bd.draw(draw_mc);
-Then you download the JPGEncoder class from adobe http://code.google.com/p/as3corelib/. This class allow you to encode your bitmapdata into a bytearray jpeg.
-Encode the bytearray into Basê64 string - http://dynamicflash.com/2006/09/actionscript-30-base64-encoderdecoder/
-Use URLLoader to send the encoded string to asp.net
-Decode base64 in asp.net and save the file

if you need example, take a look here:
http://pixelfumes.blogspot.com/2005/11/saving-flash-to-jpg-with-c-aspnet.html

If you have doubts let me know

0
dotsandcomsAuthor Commented:
Thank you for your suggestion but JPGEncode class available in ActionScript3.0 and we are working with 2.0.
Can you tell that  is there anything equivalent to JPGEncode in ActionScript 2.0? or Is there any solution  to work with JPGEncoder Class in Action Script 2.0?
0
julianopolitoCommented:
you could take a look at this code here

http://www.quasimondo.com/archives/000645.php

and adjust as needed. For this to be done in flash 8 is not trivial, usually one has to iterate through every pixel using BitmapData.getPixel and convert that into array, send array to php, iterate again over the pixels from flash, put together into image.

here you can find some other code also:
http://www.actionscripts.org/forums/showthread.php3?p=420106



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Components

From novice to tech pro — start learning today.