Hi, I'm working with FlashPlayerControl (licensed version, for eTree/Etnoteam company - Treviso - Italy), .net framework 2.0, C#, Visual Studio 2005.
I'm using a FlashPlayerControlLibrary.FlashPlayerForm with an swf movie embedded. Using external interface, the swf movie makes a various number of function calls to the the .net methods provided and everything works fine.
I'm getting a serious problem when I implement a method that closes the current form:
private void MyExitMethod()
{
this.Close();
}
The behaviour looks like this:
- when calling MyExitMethod() directly from .net FlashPlayerForm everything works fine (I used an override of the mousewheel event to call MyExitMethod ).
- when calling MyExitMethod() as a reply to a flash request, MyExitMethod is executed but then I get a general error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This exception is raised on the main thread of my application ( on the Application.Run() istruction... ).
I was able to reproduce this behaviour on your sample application Sample7_ExternalInterface (even if there you use FlashPlayerControlLibrary.FlashPlayerControl instead of the FlashPlayerControlLibrary.FlashPlayerForm). I can send you the updated sample as an attachment of this message.
I suppose that FlashPlayerControlLibrary doesn't release some objects, I really don't know what to do, I've tried a call to Marshal.Release but I cant' call this on a FlashPlayerForm.
Thanks in advance,
have a nice day