1 Reply Latest reply on Dec 20, 2006 5:39 AM by peterent

    How to write a waiting loop please?


      I wrote a function like this

      public function inputBox (sPrompt:String) : String { ... }

      which displays a prompt, an entry field (TextInput) and an "OK" button. I used a TitleWindow as the container for the controls and displayed it using the PopUpManager.

      My problem is that a code like this:

      var sResponse:String = inputBox("Enter your answer:");

      cannot work because the script execution doesn't stop to wait for the user to click the "OK" button. sResponse get it's value while the TitleWindow is not yet even displayed!

      Any idea please?