Im making a game called escape from alcatraz and I need some of the actionscript but dont know what that certain line of action script is needed to do what I want to do I want a guy to walk up to the door then you have to punch in the code with the mouse on the keypad on the door to get to the other side. Here is a example that I found go to www.stickdeath.com then go to shocked shi* on the left side of the menu then go to the bottomof that page to find a game called escape from greenvile when you start off theres a paper on ground click and hold it then tells you the code then you go up the alley way to the door where the code is needed to get through the door could any body please tell me what line or whatever is need in action script to do that in my game any help is really appreciated thanks for your time.
I had this problem once, this is my solution:
for simplicity, we will say the code has 3 numbers. and that code will be 486.
your set up will look something like this: (attached file)
on the very first frame of animation you have this:
global.keycode = 0
on each of the keypad buttons (1-9) you have this code:
[AS]on (release) {
keycode*=10;
keycode+= (the value of the button ex. 5 or 9);
}
then, on the "submit" button, you have:
on (release) {
if (code == 486){
(what ever the proceed animation is)
output.text = “Accepted”;
} else {
output.text = “Denied”;
code = 0;
}
}
and in the properties window for the output box (dynamic text box) named output, set the VAR: keycode.
that should pretty much do it. play with it a bit if it doesn't work.
now, if you will excuse me, I'm going to go get a drink.
oops, forgot the file!