home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Puzzle / crazycube.swf / scripts / DefineSprite_192 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  2.8 KB  |  87 lines

  1. function hide()
  2. {
  3.    this._visible = false;
  4. }
  5. function show()
  6. {
  7.    if(dataSave.data.level == undefined)
  8.    {
  9.       continueGame._visible = false;
  10.    }
  11.    else
  12.    {
  13.       continueGame._visible = true;
  14.    }
  15.    _parent.credits_mc._visible = false;
  16.    credits._visible = startGame._visible = helpGame._visible = viewScores._visible = moreGames._visible = getGame._visible = downloadGame._visible = true;
  17.    final_score_mc._visible = youWin_mc._visible = downloadGame2._visible = getGame2._visible = moreGames2._visible = submitScore._visible = mainMenu._visible = false;
  18.    this._visible = true;
  19. }
  20. function showWon()
  21. {
  22.    _root.score_str = "Final score: " + _root.score;
  23.    credits._visible = startGame._visible = continueGame._visible = helpGame._visible = viewScores._visible = moreGames._visible = getGame._visible = downloadGame._visible = false;
  24.    final_score_mc._visible = youWin_mc._visible = downloadGame2._visible = getGame2._visible = moreGames2._visible = submitScore._visible = mainMenu._visible = true;
  25.    this._visible = true;
  26. }
  27. function showExit()
  28. {
  29.    _root.score_str = "Final score: " + _root.score;
  30.    credits._visible = youWin_mc._visible = startGame._visible = continueGame._visible = helpGame._visible = viewScores._visible = moreGames._visible = getGame._visible = downloadGame._visible = false;
  31.    final_score_mc._visible = downloadGame2._visible = getGame2._visible = moreGames2._visible = submitScore._visible = mainMenu._visible = true;
  32.    this._visible = true;
  33. }
  34. var dataSave = SharedObject.getLocal("3d_ligic");
  35. youWin_mc._visible = false;
  36. show();
  37. this.startGame.onRelease = function()
  38. {
  39.    hide();
  40.    youWin_mc._visible = false;
  41.    _parent.playGame.show();
  42.    _parent.level = 1;
  43.    _root.score = 0;
  44.    _parent.playGame.score = 0;
  45.    _parent.startNextLevel();
  46. };
  47. this.continueGame.onRelease = function()
  48. {
  49.    hide();
  50.    youWin_mc._visible = false;
  51.    _parent.playGame.show();
  52.    _parent.level = dataSave.data.level;
  53.    _parent.score = 0;
  54.    _parent.playGame.score = 0;
  55.    _parent.startNextLevel();
  56. };
  57. this.helpGame.onRelease = function()
  58. {
  59.    hide();
  60.    _parent.helpGame.show();
  61. };
  62. this.mainMenu.onRelease = function()
  63. {
  64.    show();
  65. };
  66. this.viewScores.onRelease = function()
  67. {
  68.    getURL(_root.viewscores_link,"_blank");
  69. };
  70. this.moreGames.onRelease = this.moreGames2.onRelease = function()
  71. {
  72.    getURL(_root.main_link,"_blank");
  73. };
  74. this.getGame.onRelease = this.getGame2.onRelease = function()
  75. {
  76.    getURL(_root.get_game_link,"_blank");
  77. };
  78. this.downloadGame.onRelease = this.downloadGame2.onRelease = function()
  79. {
  80.    getURL(_root.download_link,"_blank");
  81. };
  82. this.submitScore.onRelease = function()
  83. {
  84.    var _loc2_ = _root.hex_md5("gameid=1367&hiscore=" + _root.score + "2DPlay.com/");
  85.    getURL(String(_root.scores_link + _root.score + "&hash=" + _loc2_),"_blank");
  86. };
  87.