home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / bigtruckadventures2.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2008-09-04  |  1.0 KB  |  52 lines

  1. stop();
  2. fadeTitle = 101;
  3. startGameBut.onRelease = function()
  4. {
  5.    gotoAndStop("Instructions");
  6.    play();
  7. };
  8. freegamesBtn.onRelease = function()
  9. {
  10.    getUrl("http://www.freegamesforyourwebsite.com/click.php?gid=260&area=menu", "_blank");
  11. };
  12. highscoresBut.onRelease = function()
  13. {
  14.    gotoAndStop("HighScores");
  15.    play();
  16. };
  17. optionsBut.onRelease = function()
  18. {
  19.    gotoAndStop("Options");
  20.    play();
  21. };
  22. if(!titleSong)
  23. {
  24.    titleSong = new Sound(_root.createEmptyMovieClip("titleSongMC",5000));
  25.    titleSong.attachSound("Feed Us.mp3");
  26. }
  27. if(titleSong.position == 0)
  28. {
  29.    titleSong.start(0,999);
  30. }
  31. this.onEnterFrame = function()
  32. {
  33.    if(fadeTitle < 101)
  34.    {
  35.       fadeTitle -= 5;
  36.       titleSong.setVolume(fadeTitle);
  37.       fade._alpha = 100 - fadeTitle;
  38.       if(fadeTitle == 0)
  39.       {
  40.          titleSong.stop();
  41.          playSFX(10);
  42.          _root.startEngine();
  43.          gotoAndStop("gameMain");
  44.          play();
  45.       }
  46.    }
  47.    else if(fade._alpha > 0)
  48.    {
  49.       fade._alpha -= 5;
  50.    }
  51. };
  52.