The question is pretty straightforward: can multiple swfs listen to one swf on the same connection channel? Here's my code:
SWF A in AS3:
SWF B in AS2:Code:sendToTest.send("sendToTest", "resetForm");
...and SWF C, D, E, etc. are coded JUST LIKE SWF B. When I execute this code, SWF B does it's thing, but C, D, E, etc. do not. I'm thinking that this won't work because it's the same channel, but how inefficient is that!!! Do I have to create separate channels for each receiving SWF? That's dumb! Additionally, do I need multiple LocalConnection object to get this done, or can I do it all thru one LC, in this case "sendToTest"? For example,Code:var receiveFromCourse:LocalConnection = new LocalConnection(); receiveFromCourse = new LocalConnection(); receiveFromCourse.resetForm = function() { setMCCheckState("reset"); router.buttonFlag = false; router.resetFlag = false; router.checkFlag = false; router.initControlButton(onMCButton); router.sessionStart(); setMCAssets(); } receiveFromCourse.client = this; try { receiveFromCourse.connect("sendToTest"); } catch (e) { trace("Can't connect...the connection name is already being used by another SWF"); }
thoughts???Code:sendToTest.send("sendToTestB", "resetForm"); sendToTest.send("sendToTestC", "resetForm"); sendToTest.send("sendToTestD", "resetForm"); ...




Reply With Quote