// 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);
출처 f1this.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);
다른 도메인일경우 어떻게 할까?
http://help.adobe.com/ko_KR/AS3LCR/Flash_10.0/flash/net/LocalConnection.html
'Flash' 카테고리의 다른 글
Flash Textfield 줄수제한 (0) | 2009.01.16 |
---|---|
flash cookie 삭제 (0) | 2009.01.13 |
flash LoadVars (0) | 2008.12.28 |
Flash AS2 두 날짜 연산하기 (0) | 2008.12.17 |
FLV play back 시간 출력하자. (0) | 2008.12.02 |