I am new to ActionScript 3. I am attempting to call the server from the client using the nc.call method to see if this was a good option to use for clients to communicate back and forth in a chat application.
I received a compile error message: 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.net:Responder. Can somebody please point out what i am doing wrong?
Thank You
This is my client-side code below:
import flash.net.NetConnection;
import flash.events.NetStatusEvent;
var nc:NetConnection = new NetConnection();
nc.connect(“rtmfp:/fms/textchatexample”);
nc.addEventListener(NetStatusEvent.NET_STATUS, netHandler);
function netHandler(event:NetStatusEvent):void{
switch(event.info.code){
case “NetConnection.Connect.Success”:
trace(“Your Connected UP”);
break;
}
}
var test:Object = new Object();
test.onResult = function(arg){
trace(arg);
};
nc.call(“sendMsg”, test, “just, a test call”); ERROR LINE