Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Action Script 3, how to create a start screen for a game

New Here ,
Jan 05, 2015 Jan 05, 2015

What code do I write to create a starting screen for a game? I want to create a screen were if play is clicked it moves on to the game

TOPICS
ActionScript
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 05, 2015 Jan 05, 2015

One way of doing it:

Make a MovieClip which contains everything you want to see on the start screen, including the play button.

Add code for the button:

When the button is clicked, then the MovieClip is removed or made unvisible and another MovieClip, containing the game, is added or made visible.

Hope it helps a bit.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 05, 2015 Jan 05, 2015
LATEST

And the code for the button would be:

EnterScreen.EnterBtn.addEventListener(MouseEvent.CLICK, enterGame);

function enterGame(event: MouseEvent): void

        {

            EnterScreen.PlayBtn.removeEventListener(MouseEvent.CLICK, enterGame);

             removeChild(EnterScreen); //(or EnterScreen.visible = false)

            GameScreen.visible = true;

        }

where the "EnterScreen" is the name of the startup MoveiClip and the "GameScreen" is the name of the MovieClip which contains the game.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines