July 05, 2002

Local Connection

Local Connection kicks ass, and totally relieves the headache of fscommands in netscape, mac IE, and other broken browser platforms. I've created very short demo file which shows you how easily you can use local connections in less than 5 lines of code.

Source Code
View Demo
Macromedia Documentation

The most immediate implications are in Flash architecture, because local connections allow you to put swfs in different HTML frames (or even different browser windows!) and allow them to control each other, or share data back and forth. This approach is preferable to fscommand because it's more reliable, and requires less programming work.

You can download the zipped source code and HTML frameset pages here, or view the example here. Just export all the zipped contents, and double-click on the index.html page. Move your mouse around the left frame, and an identical drawing will appear in the right frame as well.

Posted by samuel at July 5, 2002 03:58 PM
Comments

Local Connection looks great at solving Flash to Flash communication. However, I am looking for code that will help in sending information from a browser form to Flash and then back to the HTML Form. I have a working script for IE, but it breaks in Netscape. Thanks.

Posted by: Kirk Mower at July 7, 2002 11:10 PM

hi
LocalConnection looks great ... I'm trying to acheive something much less complicated than ur demo ... i have 1 HTML, no frames or anything that has 2 cells each has an swf (and a button inside the 1st swf).. i just want to know how to make it load the 2nd swf in the other cell THEN go to a specific frame when i press the button in the 1st swf

Posted by: Moheb Emil at July 8, 2002 10:43 AM

Neato. I wonder why this wasn't documented in the online help or manual? Makes me wonder how many other undocumented features there are.

Posted by: GPG at July 12, 2002 05:49 PM

It is this local connections allow me to share/send data back and forth within the local networking enviroment ?If not, what should i use? XML socket?

Posted by: weijan at July 14, 2002 05:24 PM

Hi Sam,
I've been told and seen that your the expert on local connections, I'm trying to create something similar to your example but instead of transfering the details of mouse cursor positions i want to transfer text, I'm new to flash, and this is rarther daunting for me. what i'm trying to find out is how you send the information without having any buttons pressed. what i'm trying to do is get a variable which comes from one source to the second (which i've done) and then is passed to the third, without the first window being open, so i'm guessing the 2nd window has to be constantly sending, and also the 3rd window can't be open when the data is being sent from the first. It's for a shopping basket. I much prefer flash than all the perl and php malarchy.
I'd greatly appriciate any help,

thanks

Richard

Posted by: Richard Dowden at August 2, 2002 10:38 PM

Hi Sam

I'm using a persistant Local connection as part of a flash front end to a server application.
I've noticed that the LC stays up (or doesn't put any errors into 'status') but stops working after a certain number of bytes are transferred.

Is there a limit to the number of bytes that can be sent across a LC?

If so, I guess I'll have to create the LC each time I send a message.....

Thanks in advance for any advice.

--
nick wong

Posted by: Nick Wong at October 24, 2002 04:42 PM

Is it possible to have a local connection message recieved by more than one movie?

Posted by: jonathanClarke at February 12, 2003 10:36 AM

sweet!

Posted by: Brad Harris at June 24, 2003 05:12 PM

Situation:
Two files: index.swf,main.swf
The index.swf consist of buttons. main.swf will be called when a button is click at index.swf.

This main.swf will be place in index.swf at level1 using loadMovie().

I just wonder can I pass variable to this main.swf after I press the button.

Thank you =p

Posted by: Joe at July 25, 2003 03:35 AM

Hi, I just wanted so say thank you guys ! i really like your site and i hope you'll continue to improving it.

Posted by: viagra at January 25, 2004 12:06 AM

Where 007 must uses his instincts and wits as he also deals with attempts on his life, double agents and finds himself falling in love with Vesper.

Posted by: Casino Royale download at November 6, 2007 12:27 PM
Post a comment









Enter the letters as shown in the box below:



Remember personal info?