all groups > macromedia flash flash remoting > february 2005 >
You're in the

macromedia flash flash remoting

group:

The Result event function stops working when inserted in a button event


The Result event function stops working when inserted in a button event SmileyBlue
2/21/2005 2:11:20 PM
macromedia flash flash remoting:
im kinda new to Remoting mx and i have a problem
the function that gets the result object stops working when i enter the script
into a button event....
even the 'trace' stops working.
but the connection still works and the CFM page returns recordset
and when i put the same script on the first frame of the movie it works just
fine and the function get invoked

//works fine
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
var getList:Service = new Service("http://localhost/flashservices/gateway",
new Log(), "RemotingService.DBconn", null, null);
var pc : PendingCall = getList.getRecord(_root.keyword_txt.text);
pc.responder = new RelayResponder(this, "getRecordResult", "getRecordFault");
function getRecordResult(re:ResultEvent):Void {
DataGlue.bindFormatStrings(list, re.result, "#NAME#,#TITLE#");
}
function getRecordFault(fa:FaultEvent) {
}





//dosnt work and even the trace inside the function is not invoked
on (click) {
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;
var getList:Service = new Service("http://localhost/flashservices/gateway",
new Log(), "RemotingService.DBconn", null, null);
var pc : PendingCall = getList.getRecord(_root.keyword_txt.text);
pc.responder = new RelayResponder(this, "getRecordResult", "getRecordFault");

//this function is not invoked
function getRecordResult(re:ResultEvent):Void {
DataGlue.bindFormatStrings(_root.list, re.result, "#name#,#title#");
trace("test");
}
function getRecordFault(fa:FaultEvent) {
}
}

Re: The Result event function stops working when inserted in a button event SmileyBlue
2/21/2005 5:01:55 PM
just one update
the issue is not in buttons...the issue in components
AddThis Social Bookmark Button