Hi.
simply trying to download files such as .zip or .pdf.
The dialog box which tells me wher i want to download the file appears, i
click OK, the dialog box closes and nothing is downloaded.
files are on the same server.
Did someone has a similar issue ?
thx,
N.
here is my code:
package
{
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import flash.net.FileReference;
import flash.net.URLRequest;
import flash.events.IOErrorEvent;
public class FileListItem extends MovieClip
{
private var _fileToDownload :FileReference;
public function FileListItem(p_fileLocation:String)
{
_fileToDownload = new FileReference();
btDownload.addEventListener(MouseEvent.CLICK,
_onDownload);
};
private function _onDownload(p_evt:MouseEvent):void
{
_fileToDownload.addEventListener(IOErrorEvent.IO_ERROR,
_onIOError)
_fileToDownload.download(new URLRequest(_fileLocation),
_fileLocation);
}
private function _onIOError(p_evt:IOErrorEvent):void
{
trace (p_evt);
}
}
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders