And80 io come ho detto anche da altre parti....PURTROPPPO...non ho inventato nulla è tutto sulla guida di F8
Codice PHP:
path="http://www.dominio.it/public"
import flash.net.FileReferenceList;
import flash.net.FileReference;
var listener:Object = new Object();
listener.onSelect = function(fileRefList:FileReferenceList) {
trace("onSelect");
boardmsg.htmlText+="onSelect"+"
"
var list:Array = fileRefList.fileList;
var item:FileReference;
for(var i:Number = 0; i < list.length; i++) {
item = list[i];
trace("name: " + item.name);
boardmsg.htmlText+="file selezionati"+item.name+"
"
trace(item.addListener(this));
item.upload(path);
}
}
listener.onCancel = function():Void {
trace("onCancel");
boardmsg.htmlText+="Chiusa DialogBox"+"
"
}
listener.onOpen = function(file:FileReference):Void {
trace("onOpen: " + file.name);
boardmsg.htmlText+="onOpen: " + file.name+"
"
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal);
boardmsg.htmlText+="onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal+"
"
}
listener.onComplete = function(file:FileReference):Void {
trace("onComplete: " + file.name);
boardmsg.htmlText+="onComplete: " + file.name+"
"
}
listener.onHTTPError = function(file:FileReference, httpError:Number):Void {
trace("onHTTPError: " + file.name + " httpError: " + httpError);
boardmsg.htmlText+="onHTTPError: " + file.name + " httpError: " + httpError+"
"
}
listener.onIOError = function(file:FileReference):Void {
trace("onIOError: " + file.name);
boardmsg.htmlText+="onIOError: " + file.name+"
"
}
listener.onSecurityError = function(file:FileReference, errorString:String):Void {
trace("onSecurityError: " + file.name + " errorString: " + errorString);
boardmsg.htmlText+="onSecurityError: " + file.name + " errorString: " + errorString+"
"
}
var fileRef:FileReferenceList = new FileReferenceList();
fileRef.addListener(listener);
//fileRef.browse();
btn.onPress=function(){
fileRef.browse([{description: "Image Files", extension:"*.jpg;*.gif;*.png"}]);
}
tuttavia se non hai F8 per provare. Grazie lo stesso.