LOCOMA
I have almost finished work on a little component called LOCOMA which is short for Local Connection Manager. Eric Dolecki somewhat inspired me by his post on Flashcoders where he asked if it possible to use localConnection between more that just two clips. This reminded me of an old project of mine where I used this technique for my Google search engine.
I took the original concept a step further and I think that I came up with something quite cute. At the moment all you have to do is to drag the component onto any swf that you want to communicate and it will be able to talk to all the other swfs around and get their messages. There is no limit on the amount of clips (well, perhaps there is a CPU limit). You are able to call any method in any of the other clips as long as you know the path to the object which contains the method. You can send messages to a subselection of the clips and you can ignore messages from certain clips. I guess LOCOMA 1.0 should be ready in one or two days. I still have to work on the cross-domain stuff.
But here is the demo. To have fun click on the link 2 or more times, so you get more instances. If you select 1 or more names from the list you can send commands or messages to only the selected names. You will have to change "generic" to something like "John", "Moira" or "Willy", because a message goes out to all clips with the same name. Oh and please do not look at the graphics - this is pure geekware.
Posted at February 05, 2003 09:47 PM | Further reading
Did he say 'cute'? I could swear that I saw the word cute in that :)
On a more serious note, good job on the projects! Cant wait to test this out.
Are you going to release the source? Are you using shared objects to track channels?
As this will be a component you can check out the source if you like. And no, no shared object necessary. It's just local connection.
Could you please send me some examples using multiple swf files?
Thanks
I'm just wondering but i'm having trouble sending large amounts of data through the local connection object. i haven't tried locoma yet but was wondering have you ever experienced any problems with sending large data chunks?
I never used it to send large amounts - I think there is a size limit what you are allowed to send. And I think the local connection stops if there is too much communication happening. I think there was a thread on Flashcoders about that. You might want to check the archives: http://chattyfig.figleaf.com
Hey, I like the idea of a component for this whole LC thing. It really seems like something isanely usefull for sites that have to split up the page for content.
Here's my question, I am working on a site where I want to have the main (flash) menu tell the sub-menu(flash) to gotoandstop on a frame (which will end up being the correct submenu for that section. Is possible, or is LC just for sending data? IF not do you have any clue about steering me in the right direction?
THankx,
_Michael
Calling methods (like gotoAndStop or gotoAndPlay) in other movies is definitely possible with LOCOMA.
This Rocks! I launched one instance, played with it, then launched another and played with it and even though they where not aligned with each other they still adjusted relitive to each other, Maybe in LOCOMA you can have a Synchronize option that would bring them together. Thanks for this!
In the Pet Market app they use the local connection for the back button functionality, when I found this I got really hyped about the possibilities of the Local Connection. One thing I can't figure out is where they send the variables back to the main movie they send it as one Object, how do you access the object in they main movie?
Sent connection:
main_lc.send("main", "gotoState", _global.state_obj);
If I change the "_global.state_obj" to a single variable I can retrieve it but it would be nice to know how to access this how it is intended. Do I have to recreate the object in the Main swf before the connection?
Any assistance will be appreciated.
Todd