Situation: For an app I am working on, I'm using FR to retrieve lists and to start a slideshow. I'm using the recommended form of creating a new Service and then pendingCalls/relayResponders. This works as should at the start of the script, but there is an onRelease function I need to advance the mc. And inside that function is a pendingCall to initialize a session. The result of that service method is also required for later. Problem: The pendingCall, relayResponder and service method all execute inside the onRelease function but I cannot trace or use the result like I can outside the onRelease(). The Net debugger panel shows that the result is being broadcast back to me but I cannot trace/display it. Are pendingCalls or serviceMethods not allowed to execute fully inside events functions?
I have the same problem. Did you find any solution? Thanks,
OK, I finally found the solution. You declare Service and RelayResponder in the script outside any events. In the event handler you only call the service: function whenClicked() { var pc:PendingCall = aspxService.getUsersList(); } this.ShowAllUsers_cmd.addEventListener("click", whenClicked); It is extremely disappointing that nothing in the manuals or documentation for Flash 2004 Pro or Flash Remoting covers this and many other basic situations. Considering that Flash Pro is being aimed to application developers this should not be the case.
Don't see what you're looking for? Try a search.
|