Cita:
Como vereis he dejado la funcion del boton que sube el archivo. Pero, he intentado de varias maneras y no consigo nada. Si alguien me pueda echar una mano, estaria muy agradecido.import flash.net.FileReference;
var arrTypes:Array = new Array();
var objTypes:Object = new Object();
objTypes.description = "All";
objTypes.extension = "*.*";
arrTypes.push(objTypes);
var listUpload:Object = new Object();
var fileUpload:FileReference = new FileReference();
fileUpload.addListener(listUpload);
btbrowse.onRelease = function() {
fileUpload.browse(arrTypes);
}
btenviar.onRelease = function() {
fileUpload.upload("uploadfile.php?action=upload");
}
listUpload.onSelect = function(file) {
txtarchivo.text = "Select file: " + file.name;
}
listUpload.onProgress = function(file, bytesLoaded, bytesTotal):Void {
txtestado.text = "Uploading file... " + Math.round(bytesLoaded*99/bytesTotal) + "%";
}
listUpload.onComplete = function(file:FileReference):Void {
gotoAndPlay(2);
txtestado2.text = "File uploaded successfully.";
link.text = "www.folter.es/upload/uploads" + file.name;
}
var arrTypes:Array = new Array();
var objTypes:Object = new Object();
objTypes.description = "All";
objTypes.extension = "*.*";
arrTypes.push(objTypes);
var listUpload:Object = new Object();
var fileUpload:FileReference = new FileReference();
fileUpload.addListener(listUpload);
btbrowse.onRelease = function() {
fileUpload.browse(arrTypes);
}
btenviar.onRelease = function() {
fileUpload.upload("uploadfile.php?action=upload");
}
listUpload.onSelect = function(file) {
txtarchivo.text = "Select file: " + file.name;
}
listUpload.onProgress = function(file, bytesLoaded, bytesTotal):Void {
txtestado.text = "Uploading file... " + Math.round(bytesLoaded*99/bytesTotal) + "%";
}
listUpload.onComplete = function(file:FileReference):Void {
gotoAndPlay(2);
txtestado2.text = "File uploaded successfully.";
link.text = "www.folter.es/upload/uploads" + file.name;
}
Saludos ^^