|
|||
|
Hello =)
I've got a little question. Do you know if it is "normal" that when my app communicate with the externalInterface, it freezes ? example when I run a shell or I upload on a ftp : ftp.setEventHandler("onUpload", onupload); private function onupload(percent){ sortie.text +=percent; } all works properly but during the upload, the application freeze, and the sortie.text is updated only when upload has finished... is there any solution to that ? Thank's a lot !! =) |
|
|||
|
I seem to have the same problem, while uploading the file the program freezes. The above code doesn't fix that.
Code:
uploadFile = function(){
var f = "Alle files(*.*)|*.*|";
var res = Dialogs.fileOpen(f, "", "", false);
var inet = new Inet;
if(res != false){
f = new File(res);
var ftp = inet.openFtp("ftp server", "port", "username", "password");
ftp.connect();
ftp.currentDir = "/kenney";
ftp.setEventHandler("onUpload", onupload);
ftp.onupload = function(percent){
if (!Global.processMsg()) return;
FlashPlayer.setVariable("percent", percent);
FlashPlayer.setVariable("percent_show", percent + "%");
return true;
}
ftp.upload(f.name, res);
ftp.close();
}
}
|
|
|||
|
Is it actionscript or ffish script?
If the former, the code should be Code:
ftp.setEventHandler("onUpload", ftp.onupload);
ftp.onupload = function(_percent){
if (!Global.processMsg()) return false;
percent.text = _percent;
percent_show.text = _percent + "%";
return true;
}
Code:
// ftp.setEventHandler("onUpload", onupload);
ftp.onUpload = function(percent){
if (!processMsg()) return false;
FlashPlayer.setVariable("percent", percent);
FlashPlayer.setVariable("percent_show", percent + "%");
return true;
}
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|