dennissteir
07-08-2005, 07:13 PM
I got this actionscript from macromedia:
// 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);
I know basically what it is doing, and what parts of the script to modify, but this is over my head.
I am communicating between two .swf files in different frames, in the same domain, but instead of doing all of this text stuff I need to simply pass the variable "page".
How can I create a localConnection to pass a variable? Please help.
// 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);
I know basically what it is doing, and what parts of the script to modify, but this is over my head.
I am communicating between two .swf files in different frames, in the same domain, but instead of doing all of this text stuff I need to simply pass the variable "page".
How can I create a localConnection to pass a variable? Please help.