A Couple Scripts, Maybe?

I need to do two things that I don’t believe are possible with logic bricks…
Can I make the game engine change the scene after a specified # of frames? I want the scene to change after an animation is over.

Also: I want to have a scene-selection menu where the player enters a code with the keyboard and presses enter, then blender will take them to the scene which corresponds to the code they typed. The catch: the scenes will be in different files. Is this possible?

For enter code make a string and Key 1 adds the string a number
and if property is equal then set scene: something

Here is an example: http://www.zone.ee/xintest/code.blend
Controlls:
1; 2; 3; 4; 5; 6; 7; 8; 9; 0
R - Restart
The codes are 221 and 772

For the animation thingie make something like:
Make a timer if timer is Invertal(let’s say) Min:0 Max:1 Play animation
and if timer is Invertal Min:1 Max:2 play some other animation…
And the same thing with scenes.
when timer is invertal Min:0 Max:1 play animation
and if Timer is invertal min:1 max:2 set scene: something

Here is an example: http://www.zone.ee/xintest/setscene.blend