Hi all,
My flash application was freezing when going to fullscreen mode using externalInterface. I solved the problem, and the solution is given below:
Code to go fullscreen (make sure Flash Player component is aligned to stage):
Form1.borderStyle = bsNone;
Form1.windowMode = wmMaximize;
The bug occurs when:
1) Call from flash to externalInterface to set fullscreen (e.g. on button press)
2) Delphi calls the fullscreen code above
3) Flash goes fullscreen, but then freezes completely
Why it occurs:
The bug occurs because Flash doesn't like you changing to fullscreen while the externalInterface call is still in progress.
I assume that changing to fullscreen aborts the externalInterface call, but does not update the flashPlayer to let it know the externalInterface call is no longer in progress.
solution:
1) In the externalInterface call, set a timer to call your fullscreen function in a few milliseconds
2) Exit the externalInterface function
3) The timer event fires a few ms later and changes to fullscreen. By this time the externalInterface event is complete
Hope it helps someone!