How do I make an intro screen for my game?
I have a working section of a maze game that runs entirely in an .as file but I'd like to have an intro screen in the main timeline before the main game is run. I'd like the trigger to move on to the second frame to be a keyboard input ("Press Space to play"). How can I do this?
My total code so far in frame 1 is this:
import flash.events.*;
function keyPressed (k:KeyboardEvent):void{
switch (k.keyCode) {
case(32): gotoAndStop(1);
}
}
stop();
I have the intro on the stage already when the program is run but the game doesn't stop on the stop(); statement, it just carries on and runs the maze generator so I get a maze overlaying my intro graphics.
The .as file is a complete program starting with "package {" etc. Could that be causing the problem?
Thank you.