home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer 7.46 / pcgamercd / Data / items.pcg / scripts / frame_3 / DoAction.as
Text File  |  2004-08-12  |  3KB  |  111 lines

  1. function fillMenus(numItems, whichMenuText, whichItemText, whichMenuNum, whichType)
  2. {
  3.    j = 0;
  4.    if(numItems < scrollMax)
  5.    {
  6.       j = numItems;
  7.    }
  8.    else
  9.    {
  10.       j = scrollMax;
  11.    }
  12.    i = 1;
  13.    while(j >= i)
  14.    {
  15.       if(whichType != "null")
  16.       {
  17.          set(whichMenuText + i,eval(whichType + i) + " - " + eval(whichItemText + i));
  18.       }
  19.       else
  20.       {
  21.          set(whichMenuText + i,eval(whichItemText + i));
  22.       }
  23.       set(whichMenuNum + i,i);
  24.       i += 1;
  25.    }
  26. }
  27. if(num_Games == 0 | num_Extras == 0 | num_Files == 0 | num_Demos == 0)
  28. {
  29.    gotoAndPlay(2);
  30. }
  31. if(thisprocessor == "" & loadSysTimeOut >= newTime - startTime)
  32. {
  33.    newTime = getTimer();
  34.    gotoAndPlay(2);
  35. }
  36. else
  37. {
  38.    theBarX = ItemBar1._x;
  39.    var k = Number(num_Games - 1);
  40.    var i = 0;
  41.    while(k >= i)
  42.    {
  43.       arGamesDBMain[i] = eval("gamename" + (i + 1));
  44.       arGamesDBIndex[i] = i + 1;
  45.       i += 1;
  46.    }
  47.    arGamesDBMaster = arGamesDBMain;
  48.    arGamesIndexMaster = arGamesDBIndex;
  49.    arGamesDBSlice = arGamesDBMain;
  50.    arGamesIndexSlice = arGamesDBIndex;
  51.    if(newTime - startTime < loadSysTimeOut)
  52.    {
  53.       if(thisprocessor.indexOf("Pentium") != -1 | thisprocessor.indexOf("pentium") != -1)
  54.       {
  55.          Yprocessor = "Pentium " + speed + "MHz";
  56.       }
  57.       else if(thisprocessor.indexOf("AMD") != -1 | thisprocessor.indexOf("amd") != -1)
  58.       {
  59.          Yprocessor = "AMD " + speed + "MHz";
  60.       }
  61.       else
  62.       {
  63.          Yprocessor = thisprocessor.substring(0,15) + "... " + speed + "MHz";
  64.       }
  65.       YRAM = int(thisram) + 1 + "MB";
  66.       hdFree = int(thisfreehd.substr(thisfreehd.indexOf(":") + 1));
  67.       rawHDfree = hdFree;
  68.       if(1000 < hdFree)
  69.       {
  70.          YHD = thisfreehd.substr(0,thisfreehd.indexOf(":") + 1) + " " + String(hdFree / 1000) + "GB";
  71.       }
  72.       else
  73.       {
  74.          YHD = thisfreehd.substr(0,thisfreehd.indexOf(":") + 1) + " " + String(hdFree) + "MB";
  75.       }
  76.       if(thisaccel.indexOf("GDI") == -1)
  77.       {
  78.          YAPI = thisaccel;
  79.       }
  80.       else
  81.       {
  82.          YAPI = "No 3D Card Found";
  83.       }
  84.       YDX = directxversion;
  85.    }
  86.    else
  87.    {
  88.       Yprocessor = "Scan Error";
  89.       YRAM = "Scan Error";
  90.       YHD = "Scan Error";
  91.       YAPI = "Scan Error";
  92.       YDX = "Scan Error";
  93.    }
  94.    fillMenus(num_Demos,"menudemo","demoname","demonumber","null");
  95.    fillMenus(num_Extras,"menuextra","extraname","extranumber","null");
  96.    fillMenus(num_Files,"menufile","filename","filenumber","filetype");
  97.    fillMenus(num_Games,"menugame","gamename","gamenumber","null");
  98.    num_Items = num_Demos;
  99.    if(Number(num_Demos) < scrollMax)
  100.    {
  101.       var i = Number(num_Demos) + 1;
  102.       var k = scrollMax;
  103.       while(k >= i)
  104.       {
  105.          setProperty("itemBar" + i, _X, eval("itemBar" + i + "._x") - 3000);
  106.          i += 1;
  107.       }
  108.    }
  109.    gotoAndPlay(5);
  110. }
  111.