home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
MemoryBodies-Volume2.exe
/
scripts
/
DefineSprite_331
/
frame_1
/
DoAction.as
Wrap
Text File
|
2004-11-17
|
2KB
|
85 lines
function ShuffleCards()
{
cardArray = new Array();
var startArray = [1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12];
var placeArray = new Array();
a = 0;
while(a < startArray.length)
{
placeArray.push(a);
a++;
}
a = 0;
while(a < startArray.length)
{
do
{
trg = random(placeArray.length);
newplace = placeArray[trg];
}
while(startArray[a] == startArray[newplace] && a != startArray.length - 1);
placeArray.splice(trg,1);
if(startArray[a] != startArray[newplace])
{
cardArray.push(startArray[newplace]);
}
else
{
cardArray.unshift(startArray[newplace]);
}
a++;
}
}
function ConvertTimeToText(ConvertNumber)
{
if(ConvertNumber)
{
var tempMinutes = String(int(Math.floor(Number(ConvertNumber / 60))));
var tempSeconds = String(int(Math.floor(Number(ConvertNumber))) - int(Math.floor(Number(ConvertNumber / 60))) * 60);
var tempTenths = ConvertNumber.toString().split(".");
if(tempMinutes.length < 2)
{
tempMinutes = "0" add tempMinutes;
}
if(tempSeconds.length < 2)
{
tempSeconds = "0" add tempSeconds;
}
if(!tempTenths[1])
{
tempTenths[1] = 0;
}
else
{
tempTenths[1] = tempTenths[1].charAt(0);
}
return tempMinutes add ":" add tempSeconds add "." add tempTenths[1];
}
return "00:00.0";
}
function CheckNull(checkstring)
{
if(checkstring.length < 1)
{
return true;
}
if(checkstring == "")
{
return true;
}
if(checkstring == null)
{
return true;
}
return false;
}
UseScoreboard = false;
UsePersonalBest = false;
MovieTitle = "CardGame";
ScoreboardScriptFile = "highscores.php";
ScoreboardScoresFile = "highscores.txt";
TimeCookieName = "RecordGameTime";
FlipsCookieName = "RecordFlipsTime";
stop();