No that code would not be in those examples, what you need to do is take the value from the transmitter channel(s) then create the servos movements you want from there. You are basically creating a servo mix based on the transmitter value.
So when you flick the gear switch, you call the routines to move the servos so here is an example :
This 1st chunk simply loops waits from me flick the switch, in my case position 1 on my gear switch is the high position about 1800.
The Park Bot code then moves, all my Hexapods servos to the park position. Note this is an isolated piece of code to test functions it does not do any intelligent testing, it will perform the Park_bot section until the switch is set back to zero.
I was using this to confirm the servos return to the same position each time.
In the Park_bot section I move each of the 18 servos in turn, that code is of no real use to you as I use an alternate wire library to control my servos. But in you case the idea is the same, read your switch, have a routine to unlock the gear,raise the gear and close the doors. Each servo is controlled separately so you will have to play with that code. But get each section working then tie it together. It is actually pretty simple.
// Wait for Reciever Gear switch to go to the 1 postions
ch = pulseIn(Gear,HIGH, 25000); // Read the pulse width of
while (ch > 1500)
Serial.println("Flip Gear switch to 1 to continue");
ch = pulseIn(8,HIGH, 25000); // Read the pulse width of