John Smith Posted September 18, 2015 Share Posted September 18, 2015 Hello. I'm facing a problem. I can't find a way how to know when resource has finished downloading (down)loading files. I thought onResourceStart would be triggered after the resource files were (down)loaded, but onResourceStart seems to trigger when the download starts. I'm asking for help in here because i'm facing an error which says something similiar to unable to load dff/txd file before onClientFileDownloadComplete event has finished (when that error happens, resource files are still downloading) Is there a solution to this or should i create a custom downloader for scripts/files? Link to comment
t3wz Posted September 18, 2015 Share Posted September 18, 2015 onClientResourceStart This event is triggered when a resource is started. Please note that this is not triggered the same time as the serverside event onResourceStart is. The event is triggered when any clientside resources are started. This means it is triggered when a clientside script is initiated after a download, which includes downloading after join. Link to comment
Moderators IIYAMA Posted September 19, 2015 Moderators Share Posted September 19, 2015 John, but onResourceStart seems to trigger when the download starts. This is incorrect. A resource can't start when not all files are there. If that was true, each resource would give a lot of errors while starting. Link to comment
ixjf Posted September 19, 2015 Share Posted September 19, 2015 How so? The event is triggered when the resource is started on the server - after server side scripts are loaded. The onClientResourceStart event is very similar, except it is triggered after all the client files are downloaded (which implies the resource is already running on the server). Link to comment
JR10 Posted September 19, 2015 Share Posted September 19, 2015 The server-side code is executed as soon as the resource is started, the client-side is executed when the files are downloaded. So, yes, onResourceStart can be called while the client is still downloading. Link to comment
Moderators IIYAMA Posted September 19, 2015 Moderators Share Posted September 19, 2015 Ah indeed, I did misread. I thought he mentioned onClientResourceStart. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now