home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / smashout.swf / scripts / frame_50 / DoAction.as
Encoding:
Text File  |  2005-11-09  |  1.5 KB  |  59 lines

  1. function submitScore(score)
  2. {
  3.    mcGame.stop();
  4.    if(_level0.stunt > 0 || _level0.stunt.toLowerCase() == "true")
  5.    {
  6.       _level0.playerScore = "" + score + "_" + Game.PongLevels.FRIENDS_NAMES[player] + "_" + Game.PongLevels.FOES_NAMES[opponent];
  7.       _level0.eventID = "dc_kpso_9232_stunt";
  8.    }
  9.    else
  10.    {
  11.       _level0.playerScore = score;
  12.       _level0.eventID = "dc_kpso_9232";
  13.    }
  14.    gotoAndStop("submitScore");
  15.    fsdContainer.removeMovieClip();
  16.    fsdContainer = createEmptyMovieClip("fsdContainer",30000);
  17.    fsdContainer._x = Math.floor((580 - fsdWidth) / 2);
  18.    fsdContainer._y = Math.floor((320 - fsdHeight) / 2);
  19.    var _loc1_ = fsdContainer.createEmptyMovieClip("fsd_mc",0);
  20.    _loc1_.loadMovie(fsd);
  21. }
  22. function init()
  23. {
  24.    fsdContainer._visible = false;
  25.    fsdContainer.removeMovieClip();
  26.    var _loc4_ = {player:player,side:side,opponent:opponent,startLevel:startLevel};
  27.    myGame = new Game.PongGame(this,mcGame,scoreboard_mc,_loc4_);
  28.    var _loc2_ = Game.PongLevels.FRIENDS[player] + 2;
  29.    var _loc3_ = Game.PongLevels.FOES[opponent] + 2;
  30.    if(side == 1)
  31.    {
  32.       arena_mc.nameLeft_mc.gotoAndStop(_loc3_);
  33.       arena_mc.nameRight_mc.gotoAndStop(_loc2_);
  34.    }
  35.    else
  36.    {
  37.       arena_mc.nameLeft_mc.gotoAndStop(_loc2_);
  38.       arena_mc.nameRight_mc.gotoAndStop(_loc3_);
  39.    }
  40. }
  41. function onUnloadMovie()
  42. {
  43.    mcGame.stop();
  44. }
  45. function newGame()
  46. {
  47.    delete myGame;
  48.    startGame();
  49. }
  50. if(!__inited)
  51. {
  52.    var myGame;
  53.    var mcGame;
  54.    var arena_mc;
  55.    var __inited = true;
  56. }
  57. init();
  58. stop();
  59.