5 Replies Latest reply on Sep 11, 2008 7:35 AM by razgil

    Creation of blocking modal windows


      I’m struggling, for sometime now, with the famous a-synchronic behavior of flex.
      I’m trying to develop a function that resembles the famous VB “MsgBox ()” and opens a UI container (e.g. like a Title window) in Modal mode while blocking the continuation of the rest of the code until the UI closes.

      I would like to be able to write something similar to the following set of commands:
      MsgBoxInFlex( …..); \\ blocks operation until UI closes
      if (x=……)

      Problem – as far as I know – is that such a call to a function (i.e. MsgBoxInFlex) returns the control to the calling code after the function has finished with no connection to UI container status. This means that the if command will be running as soon as the UI will be created and displayed.

      Is there a way to both create and work with on the UI container before the MsgBoxInFlex function returns?
      Is there a way to return after a different event - such as form closure?
      Is there a way to capture and block the creation completed event from being transmitted and decide on when to send it?

      Any ideas will be welcomed.