views:

47

answers:

1

I'm communicating from a flash application using a command like the following: ExternalInterface.call("hello", "world")

This is handled on the C# end by something like:

string swfPath = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "test.swf";
this.axFlash.LoadMovie(1, swfPath);
this.axFlash.FlashCall += new AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEventHandler(axFlash_FlashCall);

And the even function is declared as

void axFlash_FlashCall(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEvent e)
{
}

The axFlash_FlashCal is called fine, as long as there is a textbox on screen that's set to use TLF text. (any textbox will do, no specific ID). Without the textbox the even will not fire. (Even though ExternalInterface.Avaliable is set to true)

I've tried using CS4 and CS5 to publish, using both Flash 10 and 9 as output. None of these things have made a difference.

I'm using AS3 and .NET 4.0. Has anyone run into this before, or has any idea why TLF text is needed for this to work?

A: 

I've found this is caused because the TLF text forces the entire SWF to load before executing it. Without TLF text it tries to stream the SWF, which apparently breaks ExternalCommunication.

Does anyone know a simple way to force a pre-load? My only working solution at this point is to have one SWF pre-load another.

krtrego