Talk to Yourself
This is a pseudo chat client that demonstrates communicating between two swf files in separate frames or windows. You simply input text into the text box on one chat box and hit the 'send' button to transfer the text to the other chat box.
In all of the examples available from the bottom of this page, the movie name in the embed and object tags is 'fscom'. The text box inside the fscom swf movie is labeled 'chatbox'. The FSCommand is set to FS Command ("send", /:chatbox) from the release mouse event of the send button.
The f1 variable in each script is either preset in the html or set by a script function. The f1 variable sets the location (frame or window) for the opposite instance of the 'talk to yourself' flash file (the one you are sending the information to). The 'fscom1' variable sets the object reference for the swf.
The script is not commented at this time. In general, it works like this:
So, to set the variables in a swf in another page, you need to refer to it as f1.fscom1.setVariable("varName", "value"). Which translates as Window and Frame Reference.Embedded Object Reference.Set Variable Function
Feel free to view the source and use it as you please. I worked with the automatically generated Flash4 page (from the template for including FSCommands) so that you can easily compare it to an original and see what was added and changed.
I hope this helps.
Talk to Yourself Examples
Communicate between 2 frames