# Save Image with Open / Save Dialogue

**URL:** https://forum.kirupa.com/t/save-image-with-open-save-dialogue/265153
**Category:** flash
**Created:** [July 4, 2008, 6:43pm UTC](https://forum.kirupa.com/t/save-image-with-open-save-dialogue/265153 "2008-07-04T18:43:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ricky55](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ricky55](https://forum.kirupa.com/u/Ricky55)
#### Post date: [July 4, 2008, 6:43pm UTC](https://forum.kirupa.com/t/save-image-with-open-save-dialogue/265153/1 "2008-07-04T18:43:01Z")

</div>

I am wanting to use fileReference to open an OS save dialogue so my users can save jpgs to their hard disks.

I been trying to get this working but I can’t can any one please give me some code or some idea how to get this working.

I just want to be able to click a button and the save dialogue appear asking where to save the file.

Thanks

---

<div class="post-metadata">

### Author: ![Ricky55](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Ricky55](https://forum.kirupa.com/u/Ricky55)
#### Post date: [July 4, 2008, 7:02pm UTC](https://forum.kirupa.com/t/save-image-with-open-save-dialogue/265153/2 "2008-07-04T19:02:41Z")

</div>

Sorry got this working now

code for any one who’s interested:

```auto

import flash.net.FileReference;

var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);

var url:String = "http://www.qwerty-design.co.uk/images/jenson1.jpg";
var url2:String = "http://www.qwerty-design.co.uk/images/jenson2.jpg";

oneBtn.onRelease = function() {
	if(!fileRef.download(url, "jenson1.jpg")) {
    trace("dialog box failed to open.");
}
}

twoBtn.onRelease = function() {
	if(!fileRef.download(url2, "jenson2.jpg")) {
    trace("dialog box failed to open.");
}
}

```
