package {
import flash.display.Sprite;
public class main_control extends Sprite {
public var intro_screen:intro;
public var play_screen:the_game_itself;
public var game_over_screen:game_over;
public var how_to_play_screen:how_to_play;
public var result:Number;
public function main_control() {
show_intro();
}
public function show_intro() {
intro_screen = new intro(this);
if (how_to_play_screen) {
removeChild(how_to_play_screen);
how_to_play_screen = null;
}
addChild(intro_screen);
}
public function show_how_to_play() {
how_to_play_screen = new how_to_play(this);
removeChild(intro_screen);
intro_screen = null;
addChild(how_to_play_screen);
}
public function show_game_over() {
game_over_screen = new game_over(this);
removeChild(play_screen);
play_screen = null;
addChild(game_over_screen);
}
public function play_the_game() {
play_screen = new the_game_itself(this);
if (intro_screen) {
removeChild(intro_screen);
intro_screen = null;
}
if (how_to_play_screen) {
removeChild(how_to_play_screen);
how_to_play_screen = null;
}
if (game_over_screen) {
removeChild(game_over_screen);
game_over_screen = null;
}
addChild(play_screen);
}
}
}
import flash.display.Sprite;
public class main_control extends Sprite {
public var intro_screen:intro;
public var play_screen:the_game_itself;
public var game_over_screen:game_over;
public var how_to_play_screen:how_to_play;
public var result:Number;
public function main_control() {
show_intro();
}
public function show_intro() {
intro_screen = new intro(this);
if (how_to_play_screen) {
removeChild(how_to_play_screen);
how_to_play_screen = null;
}
addChild(intro_screen);
}
public function show_how_to_play() {
how_to_play_screen = new how_to_play(this);
removeChild(intro_screen);
intro_screen = null;
addChild(how_to_play_screen);
}
public function show_game_over() {
game_over_screen = new game_over(this);
removeChild(play_screen);
play_screen = null;
addChild(game_over_screen);
}
public function play_the_game() {
play_screen = new the_game_itself(this);
if (intro_screen) {
removeChild(intro_screen);
intro_screen = null;
}
if (how_to_play_screen) {
removeChild(how_to_play_screen);
how_to_play_screen = null;
}
if (game_over_screen) {
removeChild(game_over_screen);
game_over_screen = null;
}
addChild(play_screen);
}
}
}