In ActionScript you have two options to communicate to the host. (In my case a .NET app that uses AxInterop.ShockwaveFlashObjects.dll to host the flash movie)
fscommand(String, ...);
ExternalInterface.call(String, ...);
what are the main differences between the two?
Could it be that fscommand arrives with a little delay on the host side? (i.e. it is not blocking and could therefore get mixed up with ExternalInterface calls?)
ExternalInterfaceis a direct replacement forfscommand, which was the old method (pre Flash player 8) of communicating between Flash and the container application (see Adobe documentation).From the documentation again, the advantages of
ExternalInterfaceoverfscommandare as follows:can use with the fscommand() function.
limited to passing a command and a single string argument. This gives
the external API much more flexibility than fscommand().
String); you are no longer limited to String parameters.
immediately to ActionScript (as the return value of the call you make).
If you’re targeting Flash Player 8 or later the recommendation is that you use
ExternalInterface.