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
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. 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
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
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
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
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
[Flashcoders] LocalConnection to multiple swfs
If I've got several swfs running locally (through Director), can they all connect to the same LocalConnection object? I'm having a lot of problems getting this working in one-to-one connections because LocalConnections seem to be asynchronous, and it occurs to me that having a simple pair of connections running continually in all objects might be easier (and faster) than trying to open and run them one by one. To explain a bit more clearly the structure I'm trying to achieve, I have a main data-holding swf we'll call Data, and a bunch of data-displaying swfs we can call Display1, Display2 etc. Once initialised, I need to tell each Display to go and get data from Data. My original idea was something like this: 1) open ToData connection in Data 2) open FromData connection in Display1 3) run getData in ToData, requesting data for Display1 4) run setData in FromData, returning the data to Display1 5) close FromData connection in Display1 6) repeat 2-5 for each Display 7) close ToData connection in Data Unfortunately, because the process is asynchronous, this method was closing connections before the results have been received. (It's complicated further by the fact that I'm actually running multiple getData requests for each Display swf). I've tried various variants but they all have problems. My best idea was simply to leave ToData and FromData open continually, and pass an id number with setData and getData to route the messages appropriately. But it seems that each LocalConnection.connect() command disconnects the last. I'm rambling a bit - I guess I'm looking for some general advice. Can anyone suggest a cleaner or more appropriate approach? 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
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