The title for this recipe is a little long, but the use case is straightforward: I want to capture the visual appearance of a movieclip, encode it as a jpg, and then upload it to my server without any user interaction
I came to this problem while writing AsUnit tests for my Flash Actionscript 3 application. I wanted to test a
feature where a user can select an image file from their desktop and then upload it to the server. My tests run in a harness separate from the rest of the application and they need to run automatically without any clicks required. For various security reasons the powerful FileReferenceobject requires the user to actively select a file before any upload can occur. This restriction prevents unscrupulous RIA developers from using their powers for evil by sucking files off their user’s machines. For my purpose I could get around this limitation by simply creating a jpg within the swf movie itself to use for my upload. Lots of work for a unit test, but the idea of taking a snapshot picture of an application and posting it to a server intrigued me. I can think of several other relevant use cases, for instance handling an application fault by posting a screenshot along with rest of the relevant data to a logging server.
Подписаться на:
Комментарии к сообщению
(
Atom
)

выавыаыв
ОтветитьУдалить