# Why won't this download anything?

**URL:** <https://forum.kirupa.com/t/why-wont-this-download-anything/243783>\
**Category:** flash\
**Created:** [November 10, 2007, 9:31pm UTC](https://forum.kirupa.com/t/why-wont-this-download-anything/243783 "2007-11-10T21:31:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dokratos](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dokratos](https://forum.kirupa.com/u/Dokratos)\
**Post date:** [November 10, 2007, 9:31pm UTC](https://forum.kirupa.com/t/why-wont-this-download-anything/243783/1 "2007-11-10T21:31:52Z")

</div>

Will anyone tell me what’s wrong with this? I just can’t figure it out…:wt:

```auto
import flash.net.FileReference;
System.security.allowDomain("http://www.newopenart.com");
var listener = new Object();
var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
listener.onSelect = function(file:FileReference):Void {
 debug_txt.text = "onSelect: "+file.name;
};
listener.onCancel = function(file:FileReference):Void {
 debug_txt.text += newline+"onCancel";
};
listener.onOpen = function(file:FileReference):Void {
 debug_txt.text += newline+"onOpen: "+file.name;
};
listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
 debug_txt.text += newline+"onProgress with bytesLoaded: "+bytesLoaded+" bytesTotal: "+bytesTotal;
};
listener.onComplete = function(file:FileReference):Void {
 debug_txt.text += newline+"onComplete: "+file.name;
};
listener.onIOError = function(file:FileReference, errorString:String):Void {
 debug_txt.text += newline+"onIOError: "+file.name;
};
listener.onSecurityError = function(file:FileReference, errorString:String):Void {
 debug_txt.text += "onSecurityError: "+file.name+" errorString: "+errorString;
};
var [url:String = "http://www.newopenart.com/test01/Compositions/Arabesque1_igr.igp](http://www.kirupa.com/forum/String)";
DL.onRelease = function() {
 if (!fileRef.download(url, "Arabesque1_igr.igp")) {
  debug_txt.text += "dialog box failed to open.";
 }
};

```

I get the window to download but it never downloads anyting… why is that?

HELP ME, SOMEONE, PRETTY PLEASE!!!
