Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/05/2009, 11:58
Avatar de avielo
avielo
 
Fecha de Ingreso: junio-2008
Ubicación: Córdoba (España)
Mensajes: 111
Antigüedad: 15 años, 11 meses
Puntos: 2
trabjar con ficheros

hola wenas.

Tengo un problema al trabajar con ficheros, explico:

encontre en esta pagina como mover un fichero http://livedocs.adobe.com/flex/3/htm...system_06.html

Código:
var original = File.documentsDirectory;
original = original.resolvePath("AIR Test/test.txt");

var destination:File = File.documentsDirectory;
destination =  destination.resolvePath("AIR Test 2/copy.txt");

original.addEventListener(Event.COMPLETE, fileMoveCompleteHandler);
original.addEventListener(IOErrorEvent.IO_ERROR, fileMoveIOErrorEventHandler);
original.moveToAsync(destination);

function fileMoveCompleteHandler(event:Event):void {
    trace(event.target); // [object File]
}
function fileMoveIOErrorEventHandler(event:IOErrorEvent):void {
    trace("I/O Error."); 
}
funciona bien con archivos en el equipo local, mi problema se presenta cuando intento mover archivos en un servidor web desde air, que falla, no me encuentra el archivo. ¿hay alguna forma de mover archivos en el servidor?.

Un saludo y gracias
__________________
http://www.avielomarketing.com