I'm experiencing a problem using amfphp and flash. See the below code. I have the RegisterUser function being called by a submit button. The function successfully completes, and I get the expected amf response returned. But I only know I get it returned because I'm using a packet sniffer, as there is no trace from RegisterUser_result. The RegisterUser_result function is not fired, UNLESS I move all the code from the RegisterUser function out of the function and have it fire at runtime. So I can only assume that when RegisterUser_result is called by the RelayResponder, it can't be found. But why not? And why don't I get an error? I can call RegisterUser_result directly from inside the ResultUser function, so the function scope should be fine. function RegisterUser() { trace("in register user"); var register_service:Service = new Service(_global.gateway_url,null,"Register", null,null); register_service.connection.setCredentials(_global.amfphp_admin, _global.amfphp_pass); var ru:PendingCall = register_service.RegisterUser(txtEmail.text, txtPassword1.text, txtPassword1.text, listAge.value, listCountry.text); ru.responder = new RelayResponder(this, "RegisterUser_result", "GenericFault"); } function RegisterUser_result(re:ResultEvent) { trace("in result"); } Thanks for looking!
Don't see what you're looking for? Try a search.
|