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" <[email protected]>
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();
>
>
_______________________________________________
[email protected]
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