Groups | Blog | Home
all groups > macromedia flash flash remoting > july 2004 >

macromedia flash flash remoting : TOUGH Q: PendingCalls inside of onRelease()


jameslyon
7/13/2004 10:47:13 PM
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?
vlgvlg
7/16/2004 1:11:12 AM
I have the same problem. Did you find any solution?

Thanks,
vlgvlg
7/16/2004 1:43:13 AM
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.
AddThis Social Bookmark Button