Photon85,
It all depends on the airline and what it says in the operations manual. In my airline I would be fired if I allowed you in the cockpit like that during flight, as would be the case in most other airlines nowadays. I won't ask who you were flying with in case people start digging and find out somebody broke the rules.