This is the de facto standard approach to GUI programming, however Flex goes further than Java applets, Microsoft Silverlight and other RIA technologies by not supporting multiple threads at all. The obvious advantage here is that a naive programmer is not confronted with the difficulties of multi-threaded programming. On the other hand, there is no way to let two proceduces (in the general sense) to execute simultaneously. For example, when a long operation is being done locally, the GUI is seen to freeze.
How to prevent the Flex application from freezing up?
The cause of the problem is clearly that while this long operation is proceeding, the event loop is not processing other events such as mouse clicks. Without multiple threads, the only way to bring back responsiveness is to break up the long operation into several stages. When one stage finishes, rather than executing the next stage straight away, dispatch an event which will cause the next stage to be executed. This will only happen when the pending events have been processed.