The second param to NetConnection.call is not a function but a reference to
a flash.net.Responder instance (or subclass).  Try this instead:

import flash.net.Responder;
 
private function SendUserMessage():void {
    ChatServer_nc.call("SendUserMessage", new
Responder(SendMessageResponder),
AccountLoginResults[0].USERNAME, UserMessage.text);
}

private function SendMessageResponder() {

}

Using a Responder allows you to optionally specify a fault handler as well.

HTH,

Sam

-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Graham Pearson
Sent: Monday, October 15, 2007 6:39 AM
To: YahooGroups FlexCoders
Subject: [flexcoders] NetConnection.call Assistance

I am having an issue with NetConnection.call as I am trying to update
and convert one of my Flash8/FCS applications over to Flex2/FCS or
FMS. Searching the net for an example of the Responder has not
resulted me in any results which I can understand.


In my MXML file I have a button which calls a function of
SendUserMessage which is listed below:

private function SendUserMessage():void {
    // Send what the user has said to the Remote Shared Object so
everyone can see the results
    ChatServer_nc.call("SendUserMessage", SendMessageResponder,
AccountLoginResults[0].USERNAME, UserMessage.text);
}

private function SendMessageResponder() {

}

Now In FB I am getting an error message which says Implicit coercion
of a value of type Function to an unrealted type flash.net:Responder.

Does anyone have an example of sending what as user has typed into a
text box to FCS/FMS and then having that being displayed within a textbox.


Reply via email to