here's a file of movie titles if you want to switch things up. Most of these are US movies I think so I guess they may not be relevant in some areas of the world. I have another one with Zoo Animals and another with 1960's Songs also
Code: Select all
<script type="text/javascript">
//<![CDATA[
var alpha=new Array();
var alpha_index=0;
var bravo=new Array();
var bravo_index=0;
var running=0;
var failnum=0;
var advising=0;
var words = new Array("The Godfather",
"The Shawshank Redemption",
"Schindlers List",
"Raging Bull",
"Casablanca",
"One Flew Over the Cuckoos Nest",
"Gone with the Wind",
"Citizen Kane",
"The Wizard of Oz",
"Titanic",
"Lawrence of arabia",
"The Godfather Part II",
"Psycho",
"Sunset Blvd",
"Vertigo",
"On the Waterfront",
"Forrest Gump",
"The Sound of Music",
"West Side Story",
"Star Wars",
"E T The Extra Terrestrial",
"A Space Odyssey",
"The silence of the Lambs",
"Chinatown",
"The Bridge on the River Kwai",
"Singin in the Rain",
"Its a Wonderful Life",
"Some Like It Hot",
"Twelve Angry Men",
"Dr Strangelove",
"Amadeus",
"Apocalypse Now",
"Gandhi",
"The Lord of the Rings",
"Gladiator",
"From Here to Eternity",
"Saving Private Ryan",
"Unforgiven",
"Raiders of the Lost Ark",
"Rocky",
"A Streetcar Named Desire",
"The Philadelphia Story",
"To Kill a Mockingbird",
"An American in Paris",
"The Best Years of Our Lives",
"My Fair Lady",
"Ben Hur",
"Doctor Zhivago",
"Patton",
"Jaws",
"Braveheart",
"The Good the Bad and the Ugly",
"Butch Cassidy and the Sundance Kid",
"The Treasure of the Sierra Madre",
"The Apartment",
"Platoon",
"High noon",
"Dances with Wolves",
"The Pianist",
"Goodfellas",
"The Exorcist",
"The Deer Hunter",
"All Quiet on the Western Front",
"The French Connection",
"City Lights",
"The Kings Speech",
"It Happened One Night",
"A Place in the Sun",
"Midnight Cowboy",
"Mr Smith Goes to Washington",
"Rain Man",
"Annie Hall",
"Good Will Hunting",
"Terms of Endearment",
"Tootsie",
"Fargo",
"The Grapes of Wrath",
"The Green Mile",
"Close Encounters of the Third Kind",
"The Graduate",
"American Graffiti",
"Pulp Fiction",
"The African Queen",
"Bonnie and Clyde",
"Mutiny on the Bounty");
function pick()
{
var choice="";
var blank=0;
for(i=0; i<words[index].length; i++)
{
t=0;
for(j=0; j<=alpha_index; j++)
if(words[index].charAt(i)==alpha[j] || words[index].charAt(i)==alpha[j].toLowerCase()) t=1;
if(t) choice+=words[index].charAt(i)+" ";
else
{
if(words[index].charAt(i)==' ')
{
choice += " ";
}
else
{
choice+="_ ";
blank=1;
}
}
}
document.frm.word.value=choice;
if(!blank)
{
alert('{LA_HANGMAN_YOUWIN}');
document.frm.score.value++;
running=0;
new_word(document.frm);
}
}
function new_word(form)
{
if(!running)
{
running=1;
failnum=0;
form.lives.value=failnum;
form.tried.value="";
form.correct.value="";
form.word.value="";
index=Math.round(Math.random()*10000) % 100;
alpha[0]=words[index].charAt(0);
alpha[1]=words[index].charAt(words[index].length-1);
alpha_index=1;
bravo[0]=words[index].charAt(0);
bravo[1]=words[index].charAt(words[index].length-1);
bravo_index=1;
pick();
}
else
advise("{LA_HANGMAN_QUOTE_ALREADY}");
document.frm.res.disabled=false;
document.frm.hm.src="../ext/dmzx/hangman/styles/all/theme/images/hmstart3.gif";
for(var i=65; i<=90; i++)
document.getElementById(String.fromCharCode(i)).style.backgroundColor='#D3D3D3';
}
function restart(form)
{
running=1;
failnum=0;
form.lives.value=failnum;
form.tried.value="";
form.correct.value="";
form.word.value="";
index=Math.round(Math.random()*10000) % 100;
alpha[0]=words[index].charAt(0);
alpha[1]=words[index].charAt(words[index].length-1);
alpha_index=1;
bravo[0]=words[index].charAt(0);
bravo[1]=words[index].charAt(words[index].length-1);
bravo_index=1;
pick();
document.frm.hm.src="../ext/dmzx/hangman/styles/all/theme/images/hmstart3.gif";
for(var i=65; i<=90; i++)
document.getElementById(String.fromCharCode(i)).style.backgroundColor='#D3D3D3';
}
function seek(letter)
{
if(!running)
alert("{LA_HANGMAN_NEW_QUOTE_TO}");
else
{
t=0;
for(i=0; i<=bravo_index; i++)
if (bravo[i]==letter || bravo[i]==letter.toLowerCase()) t=1;
if(!t)
{
bravo_index++;
bravo[bravo_index]=letter;
for(i=0;i<words[index].length;i++)
if(words[index].charAt(i)==letter || words[index].charAt(i)==letter.toLowerCase()) t=1;
if(t)
{
alpha_index++;
alpha[alpha_index]=letter;
document.frm.correct.value+=letter+" ";
document.getElementById(letter).style.backgroundColor='#FFF8DC';
}
else
{
failnum++;
document.frm.tried.value+=letter+" ";
eval("document.hm.src=\"../ext/dmzx/hangman/styles/all/theme/images/hm" + failnum + ".gif\"");
document.getElementById(letter).style.backgroundColor='#CCD8FF';
}
document.frm.lives.value=failnum;
if(failnum==10)
{
alert('{LA_HANGMAN_YOU_LOSE}');
document.frm.score.value--;
running=0;
new_word(document.frm);
}
else pick();
}
else
advise("{LA_HANGMAN_LETTER} "+letter+" {LA_HANGMAN_ALREADY_USED}");
}
}
function advise(msg)
{
if(!advising)
{
advising=-1;
savetext=document.frm.correct.value;
document.frm.correct.value=msg;
window.setTimeout("document.frm.correct.value=savetext; advising=0;",500);
}
}
//]]>
</script>