So, another project is I am building a component in AS2 for handling ALL of the web services. It is a component that agencies will use to communicate with the data services in their training.
So, I have a component they use called 'WebServices' and I handle the storage and error checking for communication, but I need to come up with a STRONG process to guide developers on how to use it.
I thought of onLoad in AS2 but I don't know how it works. Can someone explain how it works and how to create it?
I want them to call as an example:
WebServices.saveTest("100");
and then be able to wait for the return as in:
WebServices.onData = function(){ etc. }
Right now developers using the early component are doing enterframes and hitting the services WAY too much while waiting for the result because theiy're retriggering it if they don't get something right away and my component waits for server return but their app isn't waiting for a return from my component. I want an easy way to guide them on how to develop and I thought if onLoad or onData.
I do have to be concerned with them waiting for the right data response as there are over 25 WS functions and I want them to trigger the timing on the correct response and not just whatever data comes first. I need asynchronous data happening.