
18.02.2009, 13:10
|
|
Регистрация: Apr 2006
Сообщений: 165
|
Air <-> Air LocalConnection не пашет..
Не пашет и все тут.. использую Air 1.1
Если просто в swf компилить то пашет все.
Приложение 1
Код AS1/AS2:
import flash.net.*;
import flash.text.*;
var debugTxt:TextField = new TextField();
debugTxt.width = 200;
debugTxt.height = 200;
addChild(debugTxt);
var conn:LocalConnection = new LocalConnection();
conn.allowDomain("*");
conn.allowInsecureDomain("*");
conn.client = this;
conn.connect("Server");
stage.addEventListener(MouseEvent.MOUSE_DOWN, mh);
function mh(e) {
conn.send("Client","test");
conn.addEventListener(StatusEvent.STATUS, stat);
}
function stat(e:StatusEvent):void {
debugTxt.appendText(e.level);
}
function test() {
debugTxt.appendText("OK");
}
Приложение 2
Код AS1/AS2:
import flash.net.*;
import flash.text.*;
var debugTxt:TextField = new TextField();
debugTxt.width = 200;
debugTxt.height = 200;
addChild(debugTxt);
var conn:LocalConnection = new LocalConnection();
conn.allowDomain("*");
conn.allowInsecureDomain("*");
conn.client = this;
conn.connect("Client");
stage.addEventListener(MouseEvent.MOUSE_DOWN, mh);
function mh(e) {
conn.send("Server","test");
conn.addEventListener(StatusEvent.STATUS, stat);
}
function stat(e:StatusEvent):void {
debugTxt.appendText(e.level);
}
function test() {
debugTxt.appendText("OK");
}
__________________
To beer or no to beer?
That is the question...
|