Uploading in AS 2

Is there any positive tutorials about uploading in Flash AS2.Shall be glad if you give me some good one

Regards

Worthless

Reference to the above I just viewed one Flash API tutorials for uploading and successful in uploading the files but how can I get a downloading links after uploading so that I can download them as and when required. Here is the AS and PHP code.

//import the FileReference Object

System.security.allowDomain("http://www.someday.com/");
import flash.net.FileReference;
//initial settings - since no upload file type selet yet user cannot upload a file
uploadButn.enabled = false;
browseButn.enabled = false
//create a new FileReference object
var fileRef:FileReference = new FileReference();
//create a listener object for FileReference events
var fileRefListener:Object = new Object();
//create a listener object for comboBox events
var myComBoxListener:Object = new Object();

var isDefault:Boolean = false;

//a small function to redraw (reset) the progress bar
function reDrawPB (pb, xCor, yCor) {
    _root.destroyObject(pb);
    _root.createObject("ProgressBar",pb,0);
       _root.progressBar.move(xCor,yCor);
}
    

//===================== COMBO BOX EVENT HANDLER =====================//

myComBoxListener.change = function(obj) {
    fileType = obj.target.selectedItem.label
    
    switch (fileType) {
        case "Images": 
            fileDescription = "Images";
            fileExtension = "*.jpg; *.jpeg; *.gif; *.png";
            reDrawPB ("progressBar", 215.9, 128);
            break;
        case "Text Files":
            fileDescription = "Text Files";
            fileExtension = "*.txt; *.rtf; *.doc";
            reDrawPB ("progressBar", 215.9, 128);
            break;
        case "Zip Files":
            fileDescription = "Zip File";
            fileExtension = "*.zip";
            reDrawPB ("progressBar", 215.9, 128);
            break;
        default:
            isDefault = true;
            trace (isDefault);
            break;
    }
    
    status_txt.vPosition = status_txt.maxVPosition;
    
    if (isDefault == true) {
        //if user select the file type option it will clear the text area
        status_txt.text="";
        browseButn.enabled = false;
        isDefault = false;
    }else {
        status_txt.text = fileDescription + ' ' + '('+fileExtension+')'+'
';
        browseButn.enabled = true;
    }
}
//apply object listener to the file reference object
fileType.addEventListener("change", myComBoxListener);

//===================== FILEREFERENCE EVENT HANDLER =====================//

//When user selects a file from the file-browsing dialog box, 
//the onSelect() method is called, and passed a reference to the FileReference object
fileRefListener.onSelect = function (fileRef:FileReference):Void {
    uploadButn.enabled = true;
    reDrawPB("progressBar", 215.9, 128);
    status_txt.vPosition = status_txt.maxVPosition;    
    status_txt.text += "File is selected to upload 
";
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "-------------------------------FILE DETAILS------------------------------- 
";
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "File Size: " + fileRef.size + " bytes" + '
';
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "File Type: " + fileRef.type + '
';
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "File Name: " + fileRef.name + '
';
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "Date Created: " + fileRef.creationDate + '
';
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "Date Modified: " + fileRef.modificationDate + '
';
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "--------------------------------------------------------------------------------- 
";
}

//When user dismiss the file-browsing dialog box, 
//the onCancel() method is called, and passed a reference to the FileReference object
fileRefListener.onCancel = function (fileRef:FileReference):Void {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="User terminated file upload. 
";
}

//When the file upload/download process started, 
//the onOpen() method is called, and passed a reference to the FileReference object
fileRefListener.onOpen = function (fileRef:FileReference):Void {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="Opening file " + fileRef.name + '
';    
}

//The onProgress() method is called periodically during the file upload operation
fileRefListener.onProgress = function (fileRef:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
    //setting the status bar function
    progressBar.mode = "manual";
    progressBar.setProgress(bytesLoaded, bytesTotal);
}

//When the file upload/download operation is successfully complete, 
//the onComplete() method is called, and passed a reference to the FileReference object
fileRefListener.onComplete = function (fileRef:FileReference):Void {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text += "The "+fileRef.name + " ha been uploaded.
";
    //upload is now complete, disable the upload & browse button
    uploadButn.enabled = false;
}

//********************************* ERROR EVENT HANDLING *********************************//

//This method will be called if and only if an upload fails because of an HTTP error
fileRefListener.onHTTPError = function (fileRef:FileReference, error:Number) {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="HTTP error: with " + fileRef.name + " :error #" + error + '
';
}

//This method will be called if and only if a file input/output error occur
fileRefListener.onIOError = function (fileRef:FileReference) {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="HTTP error: with " + fileRef.name + '
';
}

//This method will be called if and only if an upload fails because of a security error
//9 out of 10 time this error occus is because of the user Flash8 player security settings
fileRefListener.onSecurityError = function (fileRef:FileReference, errorString:String) {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="Security error: with " + fileRef.name + " : " + errorString + '
';
}
//****************************************************************************************//

//attach Listener to the FileReference Object
fileRef.addListener(fileRefListener);

//button event for the browse button
browseButn.clickHandler = function () {
    //The browse function is the key, coz it displays a file-browsing dialog box
    //in which the user can select a local file to upload
    fileRef.browse([{description: fileDescription, extension: fileExtension}]);

}

//Button event for the upload button
uploadButn.clickHandler = function () {
    status_txt.vPosition = status_txt.maxVPosition;
    status_txt.text +="Attempting to upload " + fileRef.name + '
';
    //upload the file to the PHP script on the server
    //put your domain in the upload() method
    fileRef.upload("http://www.someday.com/upload.php");
}
    

Here is the PHP code

<?php

    if (is_uploaded_file($_FILES['Filedata']['tmp_name']))     {

        $uploadDirectory = "uploads/";
        $uploadFile = $uploadDirectory . basename($_FILES['Filedata']['name']);
                
        copy($_FILES['Filedata']['tmp_name'], $uploadFile);
        
    }
?>

Thanks to all of you.

Worthless

PLEASE ANSWER ME I MA REALLY NEED OF THIS.

Worthless