Btn to Cancel FileReference download

Hi, I can’t figure out how to make a button cancel downloads started using FileReference. Below is the code that is used to start the download. If you could let me know the right code to put in the on(release) of my cancel button that would be great. Thanks!

import flash.net.FileReference;
var listener:Object = new Object();
listener.onCancel = function(file:FileReference):Void {
//the code for what to do when user hits cancel on dialogue box
};
listener.onOpen = function(file:FileReference):Void {
//etc etc these listeners go on
};