Making a codelock feature
Once again I was recently asked if there was a way to have a user enter a code to access a hidden part of a DVD. The short answer is ‘yes’, but you must remember that anything on a DVD can be accessed very easily using a computer and a few simple (and free) programs. As such, trying to hide anything behind a code will only provide a nominal level of protection - easily bypassed. It does, however, provide another aspect to the user experience and is always a bit of fun to include.
Making a codelock feature can be done in a few different ways. Using a menu which is set up to look like a number pad you can copy the menu four times and ensure that only one button in each menu links on to the next in the sequence. All others can go to a different screen. That way, the user has to enter the correct number, the menu changes for the second number input and the sequence repeats.
However, you might choose to use a single menu and enter into the world of scripting. Each button on the menu has a value, and you can use a GPRM to track that value, store it and check to see whether or not the entire sequence entered is correct at the end of the sequence. This is probably more secure, but not infallible.
If you go this wa then you’ll need to think about storing and retrieving values from a GPRM… you could end up doing some fairly high level math! Fortunately, Alex Alexzander has provided a way forward, and written a superb tutorial already. Have a look at http://www.sfbaaug.org/tutorials/codelock.html