Yea maybe. It doesn't seem to make any sense to me. the only thing I can
possibly think of is that there's some remoting issue that prevents the result
handler from being called. The way I've worked around it (which is annoying)
is I call the class from the actions panel in the clip....do everything I can
do in the class, then pass back a function call to the clip, which then turns
around and recalls the class.
Really not the best way to do things but I can't seem to figure out why I
can't call a class and have the class do some calcs....call a remoting to the
db......get the results.....do something with them....then make another
function call.....do some more calcs....do another db call....etc. Just seems
silly that so many of us are having this same type of issue.
SUCCESS!!!!
Previously, I had code in a function that created my Service, PendingCall, and
RelayResponder objects, like so:
--------------
function checkConditions():Void
{
var s:Service = new
Service("http://adworkshop2.media3.net/flashservices/gateway",null,"remoting.gor
e.trail",null,RR_getConditions);
var pc:PendingCall = s.getConditions();
pc.responder = new RelayResponder(this,"onSuccess","onFault");
}
----------------
This would work first time through, then fail to call onSuccess() with each
subsequent call.
The change I made was to create my RelayResponder object on the main timeline,
outside of the function.
------
var myRR:RelayResponder = new RelayResponder(this,"onSuccess","onFault");
------
Then, when I create my Service object, I pass myRR as the final argument.
----
var s:Service = new Service(remotingCon,null,"trail",null,RR_myRR);
------
Now onSuccess is called as expected.
Wish I could explain why my first attempt wasn't working, but at least this
solved it.
So, if you have a class that includes all your remoting code, try placing the
Remoting objects in your main timeline and calling them from your class.
Programatically speaking, we shouldn't have to do this, but come on, it's
FLASH!!
How many times have you stumbled upon a strange solution like this?
Hopefully Adobe will tighten there Software Development squad up a bit.