Flash player freezes when set to fullscreen

F-IN-BOX for Delphi / Builder C++ / VCL
pixelthis
Posts: 8
Joined: Wed Aug 27, 2008 4:07 am

Flash player freezes when set to fullscreen

Postby pixelthis » Tue Sep 23, 2008 11:46 pm

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!

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Sep 24, 2008 7:37 am

Thank you very much!
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 8 guests