2

I experience a weird issue on a LocalConnections communication between 2 swf.

The first one (FLEX application) sends a message on a dedicated LocalConnection to a second one (Flash application). The Flash then answers by sending a message on another dedicated LocalConnection. This message is not directly received by the FLEX and the delay is at least 30s, up to 1 or 2 minutes! It seems the issue only occurs with Flash Player >= 10 and it never occurs with Chrome.

I didn't find anything on the web concerning a similar issue nor something in Flash Player release notes. Did someone already have this kind of problem?

By the way, is there any tool that can be used to sniffer LocalConnection communications? It may help me to better understand the issue.

Thanks!


Additional information:

  • swf are located in different frames
  • swf are embed with swfobject
  • I tried to delay the Flash sending, I tried to create another LocalConnection dedicated to this call but I always had same result: for all calls, the FLEX method is called after the same delay.
  • I also put a timer in FLEX to periodically log to see if there is no background process delaying the method processing but everything seems fine
Jérémy Reynaud
  • 3,020
  • 1
  • 24
  • 36
  • I know it sounds silly, but could something like your firewall be causing a problem? I have Comodo Internet Security and I've had problems with it, generally when it tries to analyse too much network data at once. Perhaps try and disable it completely to rule that out. – Joel Kennedy May 06 '11 at 10:41
  • Thank you for the suggestion but the behavior occurs on many different environments, it is highly reproducible. The crazy thing is that messages are really slim (a boolean and an uint) and the first one is sent & received in few milliseconds! – Jérémy Reynaud May 06 '11 at 12:47
  • Are you testing this on multiple browsers simultaneously? This may cause some confusion with the flash player. You said "it never occurs with Chrome"...does that mean there is no delay or no response at all? Chrome, I believe, uses it's own flash player...even if you have the debug version installed. In a crunch, I have resulted to using javascript and ExternalInterface to pass data between two swfs...just sayin' :) – Corey May 06 '11 at 16:03
  • Results are the same testing on multiple browsers simultaneously on the same computer or on different machines. With Chrome there is no delay at all, everything works fine even when disabling its own flash player. Thanks for the suggestion concerning javascript & ExternalInterface, sharing SharedObjects could be a solution too. Will do it if I can understand the issue root cause... – Jérémy Reynaud May 06 '11 at 16:35
  • what embedding method are you using? – The_asMan May 06 '11 at 18:19
  • swfobject is used for embedding swf. Note that flash & flex swf are in differents frames. Code is "standard" LocalConnection communication, i.e: FLEX private function aMethod():void { ... lc.send(NAME_1, methodFlash, param) } public function methodFlex(param2):void { trace("Received " + param2); } FLASH public function methodFlash(param):void { ... lc.send(NAME_2, methodFlex, param2) } – Jérémy Reynaud May 07 '11 at 08:49
  • I tried to delay the Flash sending, I tried to create another LocalConnection dedicated to this call but I always had same result: for all calls, the FLEX method is called after the same delay. I also put a timer in FLEX to periodically log to see if there is no background process delaying the method processing but everything seems fine. – Jérémy Reynaud May 07 '11 at 08:59
  • My guess is, you're not doing it properly. Please edit your question and post the code. I've seen some weirdness in LCs before. If you can, use javascript for flash to flash communication. It's better IMO because it's constrained to the domain. – J_A_X May 09 '11 at 12:43

1 Answers1

0

I don't think the issue is with the multiple browsers, etc. I have used LocalConnection between flash + flex and have never experienced any delay. Have you tried the swfs by themselves? They should still be able to communicate. LocalConnection does not require a browser.

With LocalConnection, you are also able to detect when a connection is made as well as if there is a send error. If running the swfs standalone, you could trace any errors. Also, you can try using MonsterDebugger to diagnose issues from swfs in your browser. MonsterDebugger also uses LocalConnection, so if it works, you can be sure it's something in your code, and not the LocalConnection.

FlashJive.com
  • 216
  • 2
  • 4
  • The context is a bit special as I have to deal with some existing sources and I can't use standalone swf as the module are too closely linked to the browser context. The problem is that modules always communicate well in both ways except for this case. I tried MonsterDebugger (thanks for the suggestion, I didn't know this tool, it seems really useful) but without any result (I look into the source code and it doesn't seem to use LocalConnection but socket commnunication). I had short deadlines on this project so we choose to use another communication way: with SharedObjects... – Jérémy Reynaud May 13 '11 at 16:06