Toon posts:

[flash mx] local connections probleem

Pagina: 1
Acties:

Verwijderd

Topicstarter
Okay .. snap niet wat ik fout doe.

Heb 2 swf'jes. 1 die zend een tekst en een andere die ontvangt

de voorbeeld staat op
http://www.leihitu.nl/downloads/local_connections/

en de fla op

http://www.leihitu.nl/downloads/local_connections.zip

Kan iemand zien WAT ik fout doe?

Actionscript code op test_send.fla :
code:
1
2
3
4
5
6
7
8
9
stop();

inputLC = new LocalConnection();
inputLC.send("samePageLC", "receiverMethod","some text to send");

inputLC.onStatus = function(infoObject)
{
        _root.test.text=infoObject.level;
}



en de actionscript in test_recieve.fla

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
stop();
_root.test.text="";

outputLC = new LocalConnection();

outputLC.receiverMethod = function(param1) {
    _root.test.text=param1;
}

outputLC.onStatus = function(infoObject)
{
        _root.test.text=infoObject.level;
}


outputLC.connect("samePageLC");



_root.test. is trouwens een textblok
Het lijkt wel of de ontvangende kant niet reageert ofzo

HELP ?

  • hobbit_be
  • Registratie: November 2002
  • Laatst online: 04-07-2025
behalve dat ik je input output liefst omgekeerd zie ;) (server is echt wel de input)

ik geef je ineens de code (no time @ work)

Flash ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//client.as
_global.output_lc = new LocalConnection();
_global.ooDebugClientEcho = function(aMsg_str)
{
   _global.output_lc.send("ooDebugServer", "echo", aMsg_str, "");
}



//server.as
_global.input_lc = new LocalConnection();
_global.input_lc.echo = function(aText_str, aFrom_str) 
{ 
  _global.output_txt.text += aText_str + "\n";
    _global.output_txt.scroll = 10000000;
}
_global.input_lc.connect("ooDebugServer");