|
|||
|
Hi everybody..
I have a problem using the GetUrl function if the Inet Object.. this is my script: loadFrom = "http://localhost/myfile.txt" saveTo = "c:\\temp\\thenewfile.txt" myInet = new Inet() myInet.onGetUrl = function(type,msg){ Dialogs.msgBox("OK DONE") } myInet.getUrl(loadFrom,saveTo) it doesn't work! it downloads a file of 1Kb every time... (assumed the original file is bigger) and if I write Dialogs.msgBox("does it works? " + myInet.getUrl(loadFrom,appPath+saveTo)) it prompts "false" anybody can tell me where's the bug? thanks in Advance Kat |
|
|||
|
Hi, you should return true in the event handler to allow the downloading process to continue.
Code:
loadFrom = "http://localhost/myfile.txt" saveTo = "c:\\temp\\thenewfile.txt" myInet = new Inet() myInet.onGetUrl = function(type,msg){ if (type == 0) { trace(msg); return false; } trace(msg + "bytes received"); return true; } myInet.getUrl(loadFrom,saveTo) |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|