Re: [Flashcoders] AS2 Flash Remoting Troubles
try the following: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; import mx.utils.Delegate; // var webServiceLog = new Log(Log.VERBOSE); webServiceLog.onLog = function(txt) { trace(txt); }; // function createAccountClickHandler() { var checkUsername_pc:PendingCall = flashChat.CheckUsername(username_txt.text); checkUsername_pc.responder = new RelayResponder(this, checkUsernameResult, checkUsernameFault); } // function checkUsernameResult(msg) { trace(-- CheckUsernameResult was +msg); } // function checkUsernameFault(msg) { trace(-- CheckUsernameFault was +msg); } // var gatewayServer:String = devel.yourcfpro.com; var flashChat:Service = new Service(http://+gatewayServer+/flashservices/gateway/;, webServiceLog, properties.cfc.flashchat, null, null); createAccount_btn.addEventListener(click, Delegate.create(this, this.createAccountClickHandler)); stop(); regards, Muzak - Original Message - From: Graham Pearson [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, November 24, 2006 4:04 PM Subject: Re: [Flashcoders] AS2 Flash Remoting Troubles -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is my entire code which I am having issues with: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new Log(Log.VERBOSE); var createAccount = new Object(); createAccount_btn.addEventListener(click, createAccount); CheckSO(); var FlashChat:Service = new Service(http://; + gatewayServer + /flashservices/gateway, webServiceLog, properties.cfc.flashchat, null, null); createAccount.click = function() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_pc:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } } webServiceLog.onLog = function(txt) { trace(txt); } stop(); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] AS2 Flash Remoting Troubles
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZuU8akuGrBT7wfkRApksAJ9qWm+1smugV6f6NQpKu5J4MKZxSwCffCzU 253+eiz1UnkZrkdSDBG05Rk= =k8fY -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
Hi Graham, Did you check your typos ? we forget sometimes but, this is often the first place to look ! pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); you forgot the t in onEchoResult :) A. Graham Pearson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZuU8akuGrBT7wfkRApksAJ9qWm+1smugV6f6NQpKu5J4MKZxSwCffCzU 253+eiz1UnkZrkdSDBG05Rk= =k8fY -END PGP SIGNATURE- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
Are you importing the required classes? import mx.remoting.Service; import mx.remoting.PendingCall; import mx.remoting.RecordSet; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; What does the rest of the code look like? Are you using mx.remoting.Services or mx.remoting.NetServices? You can not use the Responder class with NetServices, you have to use the new mx.remoting.Services class. regards, Muzak - Original Message - From: Graham Pearson [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, November 24, 2006 2:03 PM Subject: Re: [Flashcoders] AS2 Flash Remoting Troubles -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In the actual fla file it is correct, I develop on one machine and Send email on another computer. I have even downloaded AS2 Remoting Examples that others have made available which give me the same result. I am currently using Flash Pro 8. Alain Rousseau wrote: Hi Graham, ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is my entire code which I am having issues with: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new Log(Log.VERBOSE); var createAccount = new Object(); createAccount_btn.addEventListener(click, createAccount); CheckSO(); var FlashChat:Service = new Service(http://; + gatewayServer + /flashservices/gateway, webServiceLog, properties.cfc.flashchat, null, null); createAccount.click = function() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_pc:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } } webServiceLog.onLog = function(txt) { trace(txt); } stop(); Which produces the following in the Debug Window: 11/25 10:2:18 [INFO] : Creating Service for properties.cfc.flashchat 11/25 10:2:18 [INFO] : Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 10:2:18 [INFO] : Successfully created Service 11/25 10:2:23 [INFO] : Invoking CheckUsername on properties.cfc.flashchat 11/25 10:2:25 [INFO] : properties.cfc.flashchat.CheckUsername() returned true Graham Pearson wrote: I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZwoKakuGrBT7wfkRAkBzAKDlD9fomYFZPT40EyqZvSvMBa36mwCgsWfW DXv449oid5YtjdZh5HgoEHA= =BBwv -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
Your gateway url is down. On 11/24/06, Graham Pearson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is my entire code which I am having issues with: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new Log(Log.VERBOSE); var createAccount = new Object(); createAccount_btn.addEventListener(click, createAccount); CheckSO(); var FlashChat:Service = new Service(http://; + gatewayServer + /flashservices/gateway, webServiceLog, properties.cfc.flashchat, null, null); createAccount.click = function() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_pc:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } } webServiceLog.onLog = function(txt) { trace(txt); } stop(); Which produces the following in the Debug Window: 11/25 10:2:18 [INFO] : Creating Service for properties.cfc.flashchat 11/25 10:2:18 [INFO] : Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 10:2:18 [INFO] : Successfully created Service 11/25 10:2:23 [INFO] : Invoking CheckUsername on properties.cfc.flashchat 11/25 10:2:25 [INFO] : properties.cfc.flashchat.CheckUsername() returned true Graham Pearson wrote: I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZwoKakuGrBT7wfkRAkBzAKDlD9fomYFZPT40EyqZvSvMBa36mwCgsWfW DXv449oid5YtjdZh5HgoEHA= =BBwv -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Cheers, Ray Chuan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS2 Flash Remoting Troubles
At first glance, your pc.responder's result function isn't spelled correctly: onEchoResul. Shouldn't a 't' be at the end? - Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Graham Pearson Sent: Friday, November 24, 2006 7:28 AM To: Flashcoders mailing list Subject: [Flashcoders] AS2 Flash Remoting Troubles -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZuU8akuGrBT7wfkRApksAJ9qWm+1smugV6f6NQpKu5J4MKZxSwCffCzU 253+eiz1UnkZrkdSDBG05Rk= =k8fY -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com --- ***National City made the following annotations --- This communication is a confidential and proprietary business communication. It is intended solely for the use of the designated recipient(s). If this communication is received in error, please contact the sender and delete this communication. === ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That is because the URL is only accessible on my LAN. If I change the gateway url to www which is the public address I get the same result so I know it has to be something with my setup but I can not figure it out. I really do not want to go back to AS1 if I can help it, but I just might have to. Ray Chuan wrote: Your gateway url is down. On 11/24/06, Graham Pearson [EMAIL PROTECTED] wrote: Here is my entire code which I am having issues with: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new Log(Log.VERBOSE); var createAccount = new Object(); createAccount_btn.addEventListener(click, createAccount); CheckSO(); var FlashChat:Service = new Service(http://; + gatewayServer + /flashservices/gateway, webServiceLog, properties.cfc.flashchat, null, null); createAccount.click = function() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_pc:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } } webServiceLog.onLog = function(txt) { trace(txt); } stop(); Which produces the following in the Debug Window: 11/25 10:2:18 [INFO] : Creating Service for properties.cfc.flashchat 11/25 10:2:18 [INFO] : Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 10:2:18 [INFO] : Successfully created Service 11/25 10:2:23 [INFO] : Invoking CheckUsername on properties.cfc.flashchat 11/25 10:2:25 [INFO] : properties.cfc.flashchat.CheckUsername() returned true Graham Pearson wrote: I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 - -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZylJakuGrBT7wfkRAoBtAJ9BRi/DqWyYzPv1906C6hu2qlDIJACgljlR S5zEjb4SIwbAZSgE4mA6AZk= =yUaw -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
Q: How do you know something is obsolete? A: It works. On 11/24/06, Graham Pearson [EMAIL PROTECTED] wrote: I really do not want to go back to AS1 if I can help it, but I just might have to. -- count_schemula ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 Flash Remoting Troubles
Is there a typo in this line --- onEchoResul needs the t Odie pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS2 Flash Remoting Troubles
This may be a scoping problem, As you define your result handling function inside your clic handler. You could try this : import mx.utils.Delegate; // your usual code here createAccount.click = Delegate.create(this, clickHandler); function clickHandler() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_res:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); // btw you had twice the same var name here checkUserName_pc for PendinCall and Responder } function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } HTH A. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Graham Pearson Sent: 24 novembre 2006 10:05 To: Flashcoders mailing list Subject: Re: [Flashcoders] AS2 Flash Remoting Troubles -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is my entire code which I am having issues with: import mx.remoting.Service; import mx.remoting.PendingCall; import mx.rpc.RelayResponder; import mx.rpc.FaultEvent; import mx.rpc.ResultEvent; import mx.services.Log; var gatewayServer:String = devel.yourcfpro.com; var webServiceLog = new Log(Log.VERBOSE); var createAccount = new Object(); createAccount_btn.addEventListener(click, createAccount); CheckSO(); var FlashChat:Service = new Service(http://; + gatewayServer + /flashservices/gateway, webServiceLog, properties.cfc.flashchat, null, null); createAccount.click = function() { var checkUsername_pc:PendingCall = FlashChat.CheckUsername(username_txt.text); var checkUsername_pc:RelayResponder = new RelayResponder(this, CheckUsernameResult, CheckUsernameFault); function CheckUsernameResult(msg) { trace(-- CheckUsernameResult was + msg); } function CheckUsernameFault(msg) { trace(-- CheckUsernameFault was + msg); } } webServiceLog.onLog = function(txt) { trace(txt); } stop(); Which produces the following in the Debug Window: 11/25 10:2:18 [INFO] : Creating Service for properties.cfc.flashchat 11/25 10:2:18 [INFO] : Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 10:2:18 [INFO] : Successfully created Service 11/25 10:2:23 [INFO] : Invoking CheckUsername on properties.cfc.flashchat 11/25 10:2:25 [INFO] : properties.cfc.flashchat.CheckUsername() returned true Graham Pearson wrote: I am working on moving my AS1 Flash Remoting Applications over to AS2 and having a devil of a time. The problem that I am running into is that the code within the RelayResponder does not execute to my knowledge. Here is an example of what I am doing. function onEchoFault(rs:FaultEvent) { trace(-- onEchoFault has been executed ); } function onEchoResult(re:ResultEvent) { trace(-- onEchoResult has been executed ); } var pc:PendingCall = myService.makeEcho(Hello World!); pc.responder = new RelayResponder(this, onEchoResul, onEchoFault); When I run the application in my debugger window I get the following 11/25 7:26:11 [INFO] logger1: Creating Service for properties.cfc.HelloWorld 11/25 7:26:11 [INFO] logger1: Creating gateway connection for http://devel.yourcfpro.com/flashservices/gateway 11/25 7:26:11 [INFO] logger1: Successfully created Service 11/25 7:26:13 [INFO] logger1: Invoking makeEcho on properties.cfc.HelloWorld 11/25 7:26:15 [INFO] logger1: properties.cfc.HelloWorld.makeEcho() returned Hello Hello World! I do not get the Trace statement on the onEchoResult. What am I doing wrong. - -- Graham Pearson, System Administrator / DCG Administrator / Application Developer Northern Indiana Educational Services Center Mishawaka, IN 46544 Voice (866) 254-5322 or (574) 254-5210 / Fax (574) 254-0148 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.4 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFZwoKakuGrBT7wfkRAkBzAKDlD9fomYFZPT40EyqZvSvMBa36mwCgsWfW DXv449oid5YtjdZh5HgoEHA= =BBwv -END PGP SIGNATURE- -- This message has been scanned for viruses and dangerous content by our Email Filtering System and is believed to be clean. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.14/548 - Release Date: 2006-11-23 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.14/548 - Release Date: 2006-11-23