Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / December 2005



Tip: Looking for answers? Try searching our database.

RelayResponder wont' call the result function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
boxdoctor - 28 Nov 2005 17:04 GMT
Hi Gang.  I've had this happen before and for the life of me I can't remember
why.  In my .as file I have a call to the database which then returns a result
set.  The CFC is returning a query result which I can see in the NetDebug
window just fine...so I know the call to the db is working.  However my
responder setup for result/fault won't call either of them.  Here's the
code....any help much appreciated.

setPerms.change = function(evt:Object) {
            _root.administrator.permissionName_txt.text =
_root.administrator.clientPerms_cb.selectedItem.label;
            NetDebug.trace("Loading the Permission Objects...");
            var securityService = new Service(null, null, _global.security_service,
_global.spotCon, null);
            var PC:PendingCall = securityService.getPermObjects({adminLevel:
"restricted");
            PC.responder = new RelayResponder(this, "djData", "djFault");
        }

function djData(re:ResultEvent){
            NetDebug.trace("Adding Items to DataGrid");
   
    }

function djFault(fault:FaultEvent){
        NetDebug.trace("Problem with data load");
    }
ufitzi - 01 Dec 2005 17:26 GMT
My problem seems to be specific to Flash Player 8, I've tested in both IE and
Firefox.
not sure if  my problem is related, but here goes.
Using browsers that have FP8, I have a main movie (just a MovieClipLoader that
tracks the %) load an external SWF.
The external SWF contains a remoting call, used to initialize a ComboBox.
Because the SWF is already deployed, and because this problem is only
occurring in FP8, I'm unable to determine where the remoting call is
"breaking," but the result method is never invoked.
BUT, if I isolate the external SWF and just run it in an html page, the
remoting procedure works.
Both SWF's are exported as 7, and the remoting call is to a CFC within the
same domain.
Check it out.
THE BROKEN VERSION, WITH LOADER:    http://lakeplacid.com/flash/f/map/map.cfm
THE ISOLATED SWF:   http://lakeplacid.com/flash/f/map/test.htm
rfinn@rice - 13 Dec 2005 21:49 GMT
I have the exact same problem just developing in Flash 8, not even deployed in
a browser.  The debug and log show that the server is returning information (it
even changes according to the passed arguments from Flash), but the result and
fault functions simply are not being called at all.
ufitzi - 15 Dec 2005 17:58 GMT
More ingredients....(maybe we need to post this to the AS forum, no one from MM
seems to be monitoring this forum).
-------------
I'm developing a remoting app that uses setInterval() to invoke my remoting
call every X minutes.
First time through, everything is golden.
Data is returned, etc, etc.
setInterval then makes call #2, which, according to the NetDebug window,
executes successfully, however my result handler is never called.
 
boxdoctor - 15 Dec 2005 18:18 GMT
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.
ufitzi - 15 Dec 2005 18:48 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.