all groups > macromedia flash flash remoting > may 2005 >
You're in the

macromedia flash flash remoting

group:

Controlling flash from other flash.


Controlling flash from other flash. neondust
5/17/2005 12:00:00 AM
macromedia flash flash remoting:
Hi,
How can I controll flash2 from flash1, they are both on the same HTML page,
but they are not conected in any way only with HTML. This should work in both
MSIE and Mozilla FF browser.

best regards, neondust

Re: Controlling flash from other flash. Duane Robertson
5/18/2005 10:18:10 PM
Re: Controlling flash from other flash. Kiriran
5/19/2005 10:56:03 AM
search for "LocalConnection" in the flash help. there is a good example

// Code in the receiving SWF file
this.createTextField("result_txt", 1, 10, 10, 100, 22);
result_txt.border = true;
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.methodToExecute = function(param1:Number, param2:Number) {
result_txt.text = param1+param2;
};
receiving_lc.connect("lc_name");

// Code in the sending SWF file
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("lc_name", "methodToExecute", 5, 7);

AddThis Social Bookmark Button