For whatever reason, this doesn’t seem to work:
[COLOR=“DarkOrange”]AS 2 timeline:[/COLOR]
var listener = new LocalConnection();
listener.client=this;
listener.connect(“myConnection2”);
function listenerFunction(){
trace(“should work”);
dummyText.text = “bobby wins the race”;
}
[COLOR=“DarkOrange”]AS 3 timeline:[/COLOR]
var senderConn = new LocalConnection();
senderConn.addEventListener(StatusEvent.STATUS, onSenderStatus);
function onSenderStatus(event:StatusEvent):void {
switch (event.level) {
case “status” :
trace(“LocalConnection.send() succeeded”);
break;
case “error” :
trace(“LocalConnection.send() failed”);
break;
}
}
senderConn.send(“myConnection2”, “listenerFunction”);
I get the “LocalConnection.send() succeeded” trace, but it doesn’t execute the listenerFunction(); in the AS2 code. Any ideas?