home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer 7.12
/
2002-02_-_Disc_7.12.iso
/
Items.pcg
/
scripts
/
frame_3
/
DoAction.as
Wrap
Text File
|
2001-12-06
|
3KB
|
111 lines
function fillMenus(numItems, whichMenuText, whichItemText, whichMenuNum, whichType)
{
j = 0;
if(numItems < scrollMax)
{
j = numItems;
}
else
{
j = scrollMax;
}
i = 1;
while(j >= i)
{
if(whichType != "null")
{
set(whichMenuText + i,eval(whichType + i) + " - " + eval(whichItemText + i));
}
else
{
set(whichMenuText + i,eval(whichItemText + i));
}
set(whichMenuNum + i,i);
i += 1;
}
}
if(num_Games == 0 | num_Extras == 0 | num_Files == 0 | num_Demos == 0)
{
gotoAndPlay(2);
}
if(thisprocessor == "" & loadSysTimeOut >= newTime - startTime)
{
newTime = getTimer();
gotoAndPlay(2);
}
else
{
theBarX = ItemBar1._x;
var k = Number(num_Games - 1);
var i = 0;
while(k >= i)
{
arGamesDBMain[i] = eval("gamename" + (i + 1));
arGamesDBIndex[i] = i + 1;
i += 1;
}
arGamesDBMaster = arGamesDBMain;
arGamesIndexMaster = arGamesDBIndex;
arGamesDBSlice = arGamesDBMain;
arGamesIndexSlice = arGamesDBIndex;
if(newTime - startTime < loadSysTimeOut)
{
if(thisprocessor.indexOf("Pentium") != -1 | thisprocessor.indexOf("pentium") != -1)
{
Yprocessor = "Pentium " + speed + "MHz";
}
else if(thisprocessor.indexOf("AMD") != -1 | thisprocessor.indexOf("amd") != -1)
{
Yprocessor = "AMD " + speed + "MHz";
}
else
{
Yprocessor = thisprocessor.substring(0,15) + "... " + speed + "MHz";
}
YRAM = int(thisram) + 1 + "MB";
hdFree = int(thisfreehd.substr(thisfreehd.indexOf(":") + 1));
rawHDfree = hdFree;
if(1000 < hdFree)
{
YHD = thisfreehd.substr(0,thisfreehd.indexOf(":") + 1) + " " + String(hdFree / 1000) + "GB";
}
else
{
YHD = thisfreehd.substr(0,thisfreehd.indexOf(":") + 1) + " " + String(hdFree) + "MB";
}
if(thisaccel.indexOf("GDI") == -1)
{
YAPI = thisaccel;
}
else
{
YAPI = "No 3D Card Found";
}
YDX = directxversion;
}
else
{
Yprocessor = "Scan Error";
YRAM = "Scan Error";
YHD = "Scan Error";
YAPI = "Scan Error";
YDX = "Scan Error";
}
fillMenus(num_Demos,"menudemo","demoname","demonumber","null");
fillMenus(num_Extras,"menuextra","extraname","extranumber","null");
fillMenus(num_Files,"menufile","filename","filenumber","filetype");
fillMenus(num_Games,"menugame","gamename","gamenumber","null");
num_Items = num_Demos;
if(Number(num_Demos) < scrollMax)
{
var i = Number(num_Demos) + 1;
var k = scrollMax;
while(k >= i)
{
setProperty("itemBar" + i, _X, eval("itemBar" + i + "._x") - 3000);
i += 1;
}
}
gotoAndPlay(5);
}