Question
Remote SharedObject problem
Hello,
I'm having problems understanding how the connections work in FMS3 with flex 3. This is my code :
The shared object does connect. The SyncEvent.SYNC event is dispatched, however when I try to do this :
I get an Async error : Property sendMessages not found on videoconf and there is no default value. The onMessage function doesn't trigger. Do you know why ?
Additionally, how does the call() method work ? I keep getting a Call Failed message, where do I have to define the function in my main.asc ?
Thank you !
I'm having problems understanding how the connections work in FMS3 with flex 3. This is my code :
quote:
case "NetConnection.Connect.Success":
Alert.show("Successful Connection to server");
enterRoom();
break;
quote:
public function enterRoom():void
{
_so= SharedObject.getRemote("so", _nc.uri, false);
_so.addEventListener(SyncEvent.SYNC, updateUserList);
_so.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsync);
_so.addEventListener("sendMessages", onMessage);
_so.client = this;
_so.connect(_nc);
}
The shared object does connect. The SyncEvent.SYNC event is dispatched, however when I try to do this :
quote:
private function sendMessage():void
{
_so.send("sendMessages", _myName, messageArea.text);
messageArea.text="";
}
I get an Async error : Property sendMessages not found on videoconf and there is no default value. The onMessage function doesn't trigger. Do you know why ?
Additionally, how does the call() method work ? I keep getting a Call Failed message, where do I have to define the function in my main.asc ?
Thank you !
