# Time delay

**URL:** <https://forum.kirupa.com/t/time-delay/323618>\
**Category:** Uncategorized\
**Created:** [July 9, 2011, 8:27pm UTC](https://forum.kirupa.com/t/time-delay/323618 "2011-07-09T20:27:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrelusive](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@mrelusive](https://forum.kirupa.com/u/mrelusive)\
**Post date:** [July 9, 2011, 8:27pm UTC](https://forum.kirupa.com/t/time-delay/323618/1 "2011-07-09T20:27:58Z")

</div>

This is code i used for saving pictures to user computer on button click:

```auto

// Create a new instance of the FileReference class to work with. var myfileReference:FileReference = new FileReference(); // Create a new URLRequest object specifying the location or URL of the download file. // URL // var myRequest:URLRequest = new URLRequest("htp://ww.flashwonderland.com/index.html"); // relative location var myRequest:URLRequest = new URLRequest("htp://ww.mywebsite.com/picture.png"); function downloadFile (event:MouseEvent):void { // Call the download method with the URLRequest object as the parameter. myfileReference.download(myRequest); } // Hook up the button with the function downloadFile goBTN.addEventListener(MouseEvent.CLICK, downloadFile);

```

On goBTN (button) click it shows saving window at the same time.  
Can showing window be delayd for 3 second?
