home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / VenusMission.swf / scripts / frame_3 / DoAction.as
Encoding:
Text File  |  2008-09-23  |  2.6 KB  |  91 lines

  1. function setBackgroundMask(w, h, bgcolor, asbackground)
  2. {
  3.    var u = this._url;
  4.    var maskclip;
  5.    if(asbackground == true)
  6.    {
  7.       maskclip = this.createEmptyMovieClip("stagemask",this.getNextHighestDepth());
  8.    }
  9.    else
  10.    {
  11.       maskclip = this.createEmptyMovieClip("offlinemask",16000);
  12.    }
  13.    var bd = new flash.display.BitmapData(w,h,false,bgcolor);
  14.    maskclip.attachBitmap(bd,0);
  15.    if(asbackground == true)
  16.    {
  17.       maskclip.swapDepths(-16000);
  18.    }
  19.    else if(u.substr(0,4) == "file" || u.substr(-4,4) == ".swf")
  20.    {
  21.       this.setMask(maskclip);
  22.    }
  23. }
  24. function urlHandler(obj, item)
  25. {
  26.    getUrl("http://www.pastelgames.com", "");
  27. }
  28. function commentsHandler(obj, item)
  29. {
  30.    getURL("http://www.pastelgames.com/index.php?dzial=comments&co=game&id=" + this.gameId,"");
  31. }
  32. function qualityHandler(obj, item)
  33. {
  34.    if(_quality == "LOW")
  35.    {
  36.       mHQ.customItems[2] = new ContextMenuItem(" Quality: toggle to LOW",qualityHandler);
  37.       mHQ.customItems[2].separatorBefore = true;
  38.       _quality = "HIGH";
  39.    }
  40.    else
  41.    {
  42.       mHQ.customItems[2] = new ContextMenuItem("Quality: toggle to HIGH",qualityHandler);
  43.       mHQ.customItems[2].separatorBefore = true;
  44.       _quality = "LOW";
  45.    }
  46.    this.menu = mHQ;
  47. }
  48. function setContextMenu()
  49. {
  50.    mHQ.hideBuiltInItems();
  51.    mHQ.customItems[0] = new ContextMenuItem("┬⌐ pastelgames.com",urlHandler);
  52.    mHQ.customItems[1] = new ContextMenuItem("all rights reserved",urlHandler);
  53.    mHQ.customItems[1].enabled = false;
  54.    mHQ.customItems[2] = new ContextMenuItem("Quality: toggle to LOW",qualityHandler);
  55.    mHQ.customItems[2].separatorBefore = true;
  56.    this.menu = mHQ;
  57. }
  58. function load_oEF()
  59. {
  60.    var gBL = this.getBytesLoaded();
  61.    var gBT = this.getBytesTotal();
  62.    var p = gBL / gBT;
  63.    blend._y = flame.getBounds(this).yMax - flame._height * p;
  64.    percents = Math.round(100 * p) + " %";
  65.    if(gBL >= gBT && gBT > 123)
  66.    {
  67.       setBackgroundMask(550,420,6554114,true);
  68.       this.stagemask.swapDepths(0);
  69.       delete this.onEnterFrame;
  70.       this.gotoAndStop("library");
  71.    }
  72. }
  73. var mHQ = new ContextMenu();
  74. Stage.scaleMode = "noScale";
  75. getURL("FSCommand:trapallkeys",true);
  76. getURL("FSCommand:fullscreen",true);
  77. Button.prototype.tabEnabled = false;
  78. MovieClip.prototype.tabEnabled = false;
  79. setBackgroundMask(550,420,0);
  80. setContextMenu();
  81. var gameId = "venus";
  82. var gameName = "Mission To Venus";
  83. var gameYear = "2008";
  84. var mochiNumbers = ["6922f8ae"];
  85. var externalId = "agame.com";
  86. var percents = "0 %";
  87. percentsTXT.swapDepths(101);
  88. percentsTXTshadow.swapDepths(100);
  89. loadtxtMC.swapDepths(102);
  90. this.onEnterFrame = load_oEF;
  91.