home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Puzzle
/
Easter_Eggs.swf
/
scripts
/
__Packages
/
com
/
novelgames
/
flashgames
/
commonAS2
/
MainDevelopment.as
< prev
next >
Wrap
Text File
|
2008-09-04
|
3KB
|
88 lines
class com.novelgames.flashgames.commonAS2.MainDevelopment extends MovieClip
{
function MainDevelopment()
{
super();
}
static function initialize(movieClip)
{
movieClip.__proto__ = com.novelgames.flashgames.commonAS2.MainDevelopment.prototype;
movieClip.onEnterFrame = movieClip.checkTitle;
}
function gotoTitlePage()
{
this.removePage();
this.title = com.novelgames.flashgames.commonAS2.Title(this.attachMovie("Title","title",this.titleDepth));
}
function gotoInstructionsPage()
{
this.removePage();
this.instructions = com.novelgames.flashgames.commonAS2.Instructions(this.attachMovie("Instructions","instructions",this.titleDepth));
this.instructions.initialize();
}
function gotoGamePage()
{
this.removePage();
this.game = this.attachMovie("Game","game",this.titleDepth);
this.musicGame = new com.novelgames.flashgames.commonAS2.NewSound(this,"musicGame");
this.musicGame.start(0,2147483647);
}
function showInstructionsFromGame()
{
this.game.pause();
this.game._visible = false;
this.instructions = com.novelgames.flashgames.commonAS2.Instructions(this.attachMovie("Instructions","instructions",this.getNextHighestDepth()));
this.instructions.swapDepths(this.titleDepth);
this.instructions.initialize(true);
}
function hideInstructionsFromGame()
{
this.instructions.swapDepths(this.game.getDepth());
this.instructions.removeMovieClip();
this.instructions = null;
this.game._visible = true;
this.game.unpause();
}
function showHighScores()
{
this.highScores.showHighScores();
}
function showEnterHighScore(score)
{
this.highScores.showEnterHighScore(score);
}
function checkTitle()
{
if(!this.title)
{
return undefined;
}
this.onEnterFrame = null;
this.titleDepth = this.title.getDepth();
this.stop();
}
function removePage()
{
if(this.title)
{
this.title.removeMovieClip();
this.title = null;
}
if(this.instructions)
{
this.instructions.removeMovieClip();
this.instructions = null;
}
if(this.game)
{
this.game.removeMovieClip();
this.game = null;
}
if(this.musicGame)
{
this.musicGame.stop();
this.musicGame = null;
}
}
}