RE: [Flashcoders] LocalConnection to multiple swfs
Wait, you and I are saying the same thing. I can broadcast on as many "channels" as I want but I can't have a LocalConnection listen to more than the channel you pass it in the connect method. LC = new LocalConnection(): LC.connect("channelA"); If you call LC.connect("channelB"); It disconnects from channelA. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
Sorry, I meant on a single LocalConnection. BLITZ | Steven Sacks - 310-551-0200 x209 > -Original Message- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of John Grden > Sent: Wednesday, July 05, 2006 2:34 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] LocalConnection to multiple swfs > > "So, you can have multiple swfs listening to a single swf, but you cannot > have a single swf listen to multiple swfs." > > I'm not sure if I understood your thought here Steven, but with Xray, can > do > this right now with logging. Xray is listening for several SWF's to send > logging data. You just can't have multiple SWF's using a local connection > name, that's all. But you certainly can have on SWF using a particular > connection name that receives messages from multiple SWF's. > > hth, > > JG > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] LocalConnection to multiple swfs
"So, you can have multiple swfs listening to a single swf, but you cannot have a single swf listen to multiple swfs." I'm not sure if I understood your thought here Steven, but with Xray, can do this right now with logging. Xray is listening for several SWF's to send logging data. You just can't have multiple SWF's using a local connection name, that's all. But you certainly can have on SWF using a particular connection name that receives messages from multiple SWF's. hth, JG ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
The dispatcher doesn't need to know it's a unique ID. It just sends a unique ID which is then picked up by the listener. So, let's say you have 5 swfs listening to channel "Rock". They all want to hear Rock, but they also need to hear advertising to their local area. So, you would pass a unique ID as an argument and the listeners would then parse it out so you might send "Area1" as the unique ID and "Area2" as another ID and in your receiver script the swfs would determine if the message was for them or not by checking for the argument. A long time ago, I wrote a LocalConnection class. It might be of use for researching purposes. It's written in AS1 but I think it's a decent starting point for learning more about LC. It supports sending methods and arguments across LC, including the target, as well as a test method "ping" to make sure the connection is alive, and if it isn't it will reconnect. http://chattyfig.figleaf.com/pipermail/flashcoders/2003-May/076262.html BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
> So, you can have multiple swfs listening to a single swf, but you cannot > have a single swf listen to multiple swfs. The best analogy I can think of is a radio station. A radio station can transmit its signal to all its listeners. But, the radio station can only receive calls from one listener at a time. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
Hey Danny, LocalConnection is one-way communication. So if you need to send and receive, you need two LocalConnections. In addition, a movie can only have one "receiver" LocalConnection open at a time, but can transmit on as many LocalConnection channels as you like. So, you can have multiple swfs listening to a single swf, but you cannot have a single swf listen to multiple swfs. An example of LocalConnection done very well is the xRay debugger tool: http://osflash.org/xray HTH, Steven BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
> have them register with the dispatcher and receive a unique ID, that > way you can target updates to specific listeners. Does that work across multiple swfs? How can the dispatcher know what is a unique id? Actually, at the moment it looks like I can drop localConnections altogether, which I prefer anyway. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] LocalConnection to multiple swfs
have them register with the dispatcher and receive a unique ID, that way you can target updates to specific listeners. On 03/07/06, Danny Kodicek <[EMAIL PROTECTED]> wrote: > "can they all > connect to the same LocalConnection object?" > > No. For every connection (send and receive) there must be a > localconnection object. Damn. Okay, trying some alternative ideas now... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- === neilhighley.com === 0784 324 7878 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] LocalConnection to multiple swfs
> "can they all > connect to the same LocalConnection object?" > > No. For every connection (send and receive) there must be a > localconnection object. Damn. Okay, trying some alternative ideas now... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] LocalConnection to multiple swfs
"can they all connect to the same LocalConnection object?" No. For every connection (send and receive) there must be a localconnection object. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com