-
LocalConnection Problem
Hello,
I have a projectthat relies heavily on LocalConnection to keep swfs communication with the master swf. Recently, i've been getting the following error at various points in the project:
Code:
Error #2044: Unhandled StatusEvent:. level=error, code=
It seems to happen more often on page refresh, instead of on the initial page load. But it's not consistent. It does happen on page initialization sometimes as well.
Anyone know what this means? It locks up my entire desktop for flash. If i try and even browse to another flash site after this, the plug in stalls out. The only solution is for me to reboot my system.
-
Ahh i finally figured it out. Whenever you attempt to send data using LocalConnection, you need to ensure you have an event listener to handle any errors, especially if there's a chance the other connections have yet to open.
i simply added
Code:
myOutboundConnection.addEventListener(StatusEvent.STATUS, onStatus);
private function onStatus(event:StatusEvent):void {
{
switch (event.level) {
case "status":
trace("One of your LocalConnection variables was
able to connect");
break;
case "error":
trace("One of your LocalConnection variables
FAILED to connect");
break;
}
}
}
-
What if not in class.
Hello paragnoc,
I have been searching for so long trying to find a solution to this same problem. However I'm not using a class just regular AS3 inside my swf.
Could you possibly help me with how I would enter that same code into regular as3?
I know this was posted a while ago but just hopeful questioning, thanks so much if you can help at all!!!