I am looking for a way to pause action script like the way showInputBox does.
showInputBox would work great if i could add more input fields. is there a way to use your own movie clip as a inputbox that pause for user input before continuing script? Any help would be appreciated.
well, you could use AGosTools.sleep , but I'm not sure if that would be of any use for you.
If you need a custom input box you'd either have to code a plugin by yourself for that (or have somebody doing that for you) or you handle it all via Flash and a custom movieclip.
thanks the plugin is handy, but does not help in this case. I wonder why there is not any command already made. Since opening a dialog box, or error message box, stops script from running until you click ok or cancel. That is all i need. I am making a player that looks in a folder for video files and then would open a dialog box that asks user to enter a description as well as desired keywords for that video if there is no description yet. Thanks for any help
well, you really don't want to use dialog boxes as "scriptstopper".
What they are actually doing is not blocking the actionscript, but blocking the whole flash player including all animations and other timelines.
If the user needs too long to dismiss the dialog you'll get a slow-script warning from the flash player.
You should really re-organize your code to have it like:
var userInput = askUserForInput();
Think of it like breaking your code into seperated units, which have nothing in common except parameters passed to them and returned from other functions.
Then you can easily "block" your code by executing the useUsersInput() function only after the user set the values. You can then do the actual "dialog" via a custom movielclip and a custom ok-button that calls useUsersInput().
Now, the reason why there is no function like that is quite easy:
the ssCore.App.showMessageBox et. al. functions are simply wrapped calls to WinAPI function, and the basic WinAPI simply does not offer such functionality, only the parameters/dialogs exposed by SWF Studio.
QUOTE: from matthew.lukas;43673
As Tim said before , if you freeze (pause) your application using an ActionScript API command, the unfreeze command will not work after that ...