This content has been marked as final. Show 3 replies
i do similar work in vb, and so cant offer any c# specific help, but the flash player may freeze while waiting for a callback from an externalinterface call. if you dont have a callback after you make the "exit" command, this might be the problem...
OK, I figured this problem out. Tony's response got me on the right path. Thanks Tony!
What I had originally was code that would allow the Action Script to send a "Exit" command via the ExternalInterface.call() method. At the C# level for this Exit command, I was doing a form.Close() call to close the form. The form was closing, but the program itself was not exiting (the form that was closed was the main form of the application).
Apparently the problem is that I was attempting to close the form (which was the parent container of the Flash 8 ActiveX control) while Action Script logic was blocking on its call into my C# code. That's apparently a no-no.
To fix this problem I just added a simple Timer to my C# form. When the "Exit" command is received, it starts that timer then returns (returning control back to the ActionScript). The about 0.2 seconds later the Timer control fires its event, and I do the form.Close() call there. Now the program terminates cleanly.
Hope this helps.
Glad I could help. At the moment I close my forms from the wrapper itself, but if I move that functionality to the flash obj in the future, I will definitely keep this solution in mind...