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) {
}
}
SmileyBlue - 21 Feb 2005 17:01 GMT
just one update
the issue is not in buttons...the issue in components
whenever i use a component the responder object dosnt work inside!!!!!