Exit an executable using a four digit string

  • PeeZee
  • Born
  • Born
  • No Avatar
  • Joined: Jul 03, 2006
  • Posts: 1
  • Loc: UK
  • Status: Offline

Post July 3rd, 2006, 7:39 am

ello peeps, I am currently completing a flash touchscreen project and have almost finished but come up against a problem that seems so simple yet I just can't get my head around it. Okay, I've created an executable that I need to close when a user enters a four digit string. The default is to exit on Esc, however, this makes it too easy for a user to be able to close the executable and then have access to the computer. I'm sure that I did a similar thing whilst a Uni (but it was oh so long ago), please help!

Thanks in advanced
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 3rd, 2006, 7:39 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post July 3rd, 2006, 9:02 am

use the Key class and add a listener,
not sure right now if dynamic text has a listener for change text events.
anyway in that listener, check if the user press Enter, then
Code: [ Select ]
if (strDigits.text = "some")
  fscommand("quit");
  1. if (strDigits.text = "some")
  2.   fscommand("quit");
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 50 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.