Tag Archives: JPEG

Saving An Image To HD With ActionScript Part 2

As i stated in part 1, encoding a large image can take a few seconds – especially if it’s a high quality jpeg. While the encoding is running, flash player is unable to advance to the next frame so the FPS drops to zero until the encoding has finished; this means that all animations will pause and keyboard and mouse actions will be ignored – not a great user experience.

What we need to do is spread the encoding over multiple frames (known as threading), ie: enough frames so that the user doesn’t notice any slow-down.
Continue reading

Saving An Image To HD With ActionScript Part 1

Since Flash Player 10, we have been able to save files directly to the users system (you could do it before, but annoyingly you had to send the file to the server and then get the server to send it back to the user – a real pain!).

Now, it couldn’t be simpler:

var file:FileReference = new FileReference();
file.save(myData, "myFileName.ext");

Continue reading