# Save as JPG?

**URL:** <https://forum.kirupa.com/t/save-as-jpg/260727>\
**Category:** flash\
**Created:** [May 19, 2008, 11:30am UTC](https://forum.kirupa.com/t/save-as-jpg/260727 "2008-05-19T11:30:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rumblesushi](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rumblesushi](https://forum.kirupa.com/u/rumblesushi)\
**Post date:** [May 19, 2008, 11:30am UTC](https://forum.kirupa.com/t/save-as-jpg/260727/1 "2008-05-19T11:30:42Z")

</div>

FileReference is great, but what about downloading an image rather than uploading?

Is there a way to do this in Flash 8? Say, being able to save a certain movieclip as a JPG? Or rather BMdata of that movieclip as a JPG?

Joe

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [May 19, 2008, 1:30pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/2 "2008-05-19T13:30:20Z")

</div>

Hmmmm good question.

I’ve seen sites do something like this, so I supose it’s possible… but how it’s done I don’t know. I supose you need some sort of server solution that will parse some data into a jpg.

Maybe you can send a “cached as bitmap” movieclip to php and then give the user an url with a jpg.

I’ll keep an eye on this post, this is interesting. 😉

---

<div class="post-metadata">

**Author:** ![souled](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@souled](https://forum.kirupa.com/u/souled)\
**Post date:** [May 19, 2008, 3:41pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/3 "2008-05-19T15:41:28Z")

</div>

You’ll need a button with the instance name of \*\*download\_bttn  
\*\*  
**import flash.net.FileReference;  
var myFileRef:FileReference = new FileReference();  
download\_bttn.onPress = function() {  
myFileRef.download(“file url”, “default file name.file extension”);  
}**

Untested but should work.

---

<div class="post-metadata">

**Author:** ![rumblesushi](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rumblesushi](https://forum.kirupa.com/u/rumblesushi)\
**Post date:** [May 19, 2008, 4:43pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/4 "2008-05-19T16:43:22Z")

</div>

Thanks for the replies and code guys.

Souled - this code is assuming that you’ve somehow uploaded a movieclip or BMD using PHP, do you have any idea how that is done? Unfortunately I’m beyond a PHP noob, I’m a PHP blim, all I know is $ is part of it’s syntax 😉 As long as that is possible, to upload a MC or BMD to my server with PHP, then have the user download it, then it would have the result I want.

Pier25 - I’ve actually never seen it, but I suddenly had an idea to use it, so wondered if it was possible 🙂

Do you remember where you’ve seen it Pier?

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [May 19, 2008, 4:47pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/5 "2008-05-19T16:47:25Z")

</div>

[http://www.quasimondo.com/archives/000645.php](http://www.quasimondo.com/archives/000645.php)  
[http://www.quasimondo.com/archives/000572.php](http://www.quasimondo.com/archives/000572.php)

---

<div class="post-metadata">

**Author:** ![rumblesushi](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@rumblesushi](https://forum.kirupa.com/u/rumblesushi)\
**Post date:** [May 19, 2008, 4:49pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/6 "2008-05-19T16:49:10Z")

</div>

Awesome, thanks Glos. Good old Mario 🙂

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [May 19, 2008, 8:53pm UTC](https://forum.kirupa.com/t/save-as-jpg/260727/7 "2008-05-19T20:53:20Z")

</div>

[QUOTE=rumblesushi;2328215]

Pier25 - I’ve actually never seen it, but I suddenly had an idea to use it, so wondered if it was possible 🙂

Do you remember where you’ve seen it Pier?[/QUOTE]

Hm let me think…

[http://www.rhythmoflines.co.uk/](http://www.rhythmoflines.co.uk/)

When you finish your drawing you can make a picture of it, but maybe the pixels of the picture are not direct pixel screens, instead they could be generated with parameters, or something…
