home *** CD-ROM | disk | FTP | other *** search
/ Champak 48 / cdrom_image.iso / Games / bossbash.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2007-09-28  |  682 b   |  29 lines

  1. function loadGame(num)
  2. {
  3.    this.whichgame = num;
  4.    thegame.unloadMovie();
  5.    thegame.removeMovieClip();
  6.    this.attachMovie("game_" + gamnams[num],"thegame",0);
  7. }
  8. function win(tim, lif)
  9. {
  10.    stopAllSounds();
  11.    trace("API GAME WON! Game id: " + whichgame);
  12.    dia.unloadMovie();
  13.    dia.removeMovieClip();
  14.    d = _root.attachMovie("wrap_winscreen","dia",99);
  15.    d.tim = tim;
  16.    d.lif = lif;
  17. }
  18. function lose()
  19. {
  20.    stopAllSounds();
  21.    trace("API GAME LOST! Game id: " + whichgame);
  22.    dia.unloadMovie();
  23.    dia.removeMovieClip();
  24.    _root.attachMovie("wrap_failscreen","dia",99);
  25. }
  26. stop();
  27. stopAllSounds();
  28. var gamnams = new Array("mario","dd","zelda");
  29.