convert swf to exe, make flash application, flash to exe, make flash screensaver, swf to exe, swf to mp3
 
Products: SWFKit Pro, SWFKit, SWFKit Express | SWFKit Online | SWFSnd | SWFImg | SWFGen | 123FlashChat | MingX
  Home > Products > SWF Kit Series > Tutorials > How to avoid blocking
Overview Features Comparison Samples Download Buy Now Tutorials Documentation
 

7. How to avoid blocking

Download the sample

Just insert a line into the script loop.

while (...)
{
some code...
if (!processMsg()) return;
}

The "processMsg" allows the main movie to continue to play. So even if the while clause takes long time to finish, the main movie still can play as usual.

The "processMsg" methods returns false if the user clicks the "x" button of the main window. In this case, we must jump out of the while clause to exit the running program.

The sample reads data from a mdb database and writes to a text file. A progress bar in the demo shows the progress of the reading and writing.

 

 

Link to us

Contact us

Feel free to link to us!
We appreciate it!

support@swfkit.com
sales@swfkit.com
info@swfkit.com

Bookmark our site Tell a friend, Win a CD Flash Chat in China