Posted by kevin_c in SWF Studio V3 on Jan 07 2008, 06:26 am

Hey all,

Anyone got recommendations for how to exit a kiosk. I thinking about some kind of secret clicking or key combination, but figure some people here might know what's best from experience.

Thanks.


Posted by AGo in SWF Studio V3 on Jan 07 2008, 08:36 am

if you have both a mouse and a keyboard available, I would go with something like Ctrl+Alt+Right Mouse Click on a secret (no focus rect and useHandcursor = false! ) button.

The typical human visitor expects kiosk apps to be simple, and would therefore never try to "mix" mouse and keyboard controls.

however a blind typed passphrase should work as well


Posted by kevin_c in SWF Studio V3 on Jan 07 2008, 11:50 am

Ahh, good call. I was thinking of key combinations, but that's always possible to activate with a little bit of keyboard mashing.

Based on your suggestion I now have a function that gets called whenever you click on an invisible button in the lower right hand side whilst pressing SPACE and a. It then prompts the user for a password.

Here's the code, in case anyone finds it useful.


// This function is called when the button is pressed
function exitCheck() {
                                             // If space and the a key are pressed
   if ( Key.isDown(Key.SPACE) && Key.isDown(65) ) {
             passwordPrompt();
   }
}

// Prompt the user for a password
function passwordPrompt() {
   ssCore.Win.show();
   ssCore.App.showInputBox({prompt:"Please enter your password", title:"Password"}, {callback:passwordCheck});
}

// Check the inputted password
function passwordCheck(ret_obj, cb_obj, err_obj)
{
   
   if (ret_obj.result == "mypassword") {
      ssCore.App.quit();
      fscommand("quit");
   }
   
}