Sign In | Sign Up

Post

Add Hangman to ur blog :)
Size: Large, Medium, Small Sun Dec 7, 08 10:34 AM | Category: All
2

Okay.. In this tutorial I teach u how to put an simple java Hangman in ur Blog... It's completely customizeable.

First..

Click on Costumize button on ur blog...
-----------------
Second..

on top left corner click "Modules"
---------------
Third..

 

click on Costum mods
------------------------
Fourth...

 

Click on Add
-----------------------
Fifth step

 

Put in that text to ur "Body"
----------------------------------------------------------

Tip: Famous People

<body onload="count();">

<table border=1><tr>
 <form name="hang"><td align="center" colspan=13>
<font face="Comic Sans MS, Arial, Helvetica" color="teal" size="+1"><b>HANGMAN</b></font></td></tr>
 <input type="hidden" name="word" value="">

<script language="javascript">

var words=new Array();
words[0] = "GEORGE WASHINGTON";
words[1] = "JOHN ADAMS";
words[2] = "THOMAS JEFFERSON";
words[3] = "JAMES MADISON";
words[4] = "JAMES MONROE";
words[5] = "JOHN QUINCY ADAMS";
words[6] = "ANDREW JACKSON";
words[7] = "MARTIN VAN BUREN";
words[8] = "WILLIAM HENRY HARRISON";
words[9] = "JOHN TYLER";
words[10] = "JAMES POLK";
words[11] = "ZACHARY TAYLOR";
words[12] = "MILLARD FILLMORE";
words[13] = "FRANKLIN PIERCE";
words[14] = "JAMES BUCHANAN";
words[15] = "ABRAHAM LINCOLN";
words[16] = "ANDREW JOHNSON";
words[17] = "ULYSSES GRANT";
words[18] = "RUTHERFORD HAYES";
words[19] = "JAMES GARFIELD";
words[20] = "CHESTER ARTHUR";
words[21] = "GROVER CLEVELAND";
words[22] = "BENJAMIN HARRISON";
words[23] = "GROVER CLEVELAND";
words[24] = "WILLIAM MCKINLEY";
words[25] = "THEODORE ROOSEVELT";
words[26] = "WILLIAM HOWARD TAFT";
words[27] = "WOODROW WILSON";
words[28] = "WARREN HARDING";
words[29] = "CALVIN COOLIDGE";
words[30] = "HERBERT HOOVER";
words[31] = "FRANKLIN ROOSEVELT";
words[32] = "HARRY TRUMAN";
words[33] = "DWIGHT EISENHOWER";
words[34] = "JOHN KENNEDY";
words[35] = "LYNDON JOHNSON";
words[36] = "RICHARD NIXON";
words[37] = "GERALD FORD";
words[38] = "JIMMY CARTER";
words[39] = "RONALD REAGAN";
words[40] = "GEORGE BUSH";
words[41] = "BILL CLINTON";

alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
ltr=0; ltc=0;
for (i=0;i<2;i++)
 { document.write("<tr>");
   for (j=0;j<13;j++)
    { a='<td><tt><input type="button" value=" ';
      a+=alpha.substring(ltr,ltr+1)+' " onclick="';
      document.write(a+'letter(this);"></tt></td>'); ltr++; };
   document.write("</tr>"); };

var rnd=Math.floor(Math.random()*words.length);
document.hang.word.value=words[rnd].toUpperCase();
document.write('<tr><td colspan=13 align="center"><tt><font size=+2>');
for (i=0;i<words[rnd].length;i++)
 { a=words[rnd].substring(i,i+1);
   if (alpha.indexOf(a,0)>-1) { a="*"; ltc++; };
   document.write('<input type="button" value="'+a+'">'); };
document.write('</font></tt></td></tr>');

function letter(l)
 { a=l.value.substring(1,2); l.value="   "; dh=document.hang;
   if (a!=" ")
    { w=dh.word.value;
      b=w.indexOf(a,0); f=1; dhl=dh.left;
      while (b>-1)
       { dh.elements[b+27].value=a;
         b=w.indexOf(a,b+1); f=0; ltc--; };
      dhl.value-=f;
      if (dhl.value==0)
       for (j=0;j<26;j++)
        dh.elements[j+1].click();
    }; };
function count()
 { dh=document.hang; dhc=dh.clock; dhl=dh.left;
   dhc.value-=1; v=dhl.value*ltc*dhc.value
   if (v>0)
    setTimeout("count();",1000);
   else
    { msg="Congratulations!";
      if (dhl.value<0)
       msg="You Have No More Tries!";
      if (ltc>0)
       msg="Time Out! Answer:\n"+dh.word.value;
      dhl.value="0";
      alert(msg);
    }; };
</script>
<tr><td align="center" colspan=5>TURNS LEFT:<input type="button" value="10" name="left"></td>
<td colspan=5 align="center">TIME REMAINING:<input type="button" value="60" name="clock"></td>
<td colspan=3 align="center"><input type="button" value="Again" onclick="location='hangman.html';">
</td></form></tr></table>

----------------------------------------------------------------

If u look into that text it is easily editable, difficuly, answers.

Now... Choose a title for the section and press add... It should now appear at ur blog.. U can pull it round in blog like any other modules now.
 

 


Link: http://blog.bitcomet.com/shikashika/post_77086/ ©
Add to favorites | Quote Reads (551) | Comments (3)

CommentsReload

jpuura (ShikakuZ) Mon Dec 8, 08 04:44 AM

Sorry.. I saw I had some parts missing out on the tutorial.. I fixed it now please try again :)

Never give up, fight till the end... Situation may change at the last second.
[Guest]ugg boots Thu Oct 22, 09 04:22 AM

UGG Australia is a brand that is all about luxury and comfort for everyday life. Every shoe will feel great from the moment you put it on, year after year.

High quality is our foundation, good service is our duty.Enjoying your free shipping journey.Welcome to http://www.buyuggonline.com/


hhuhuhu Thu Oct 29, 09 10:02 AM

why the ugg bailey<strong> <a href="http://www.linkboots.com/ugg-womens-knightsbridge-c-50.html">ugg knightsbridge sale</a> </strong>button boot is so popular? as we known,<strong><a href="http://www.linkboots.com/ugg-womens-knightsbridge-c-50.html">ugg knightsbridge boots</a></strong> have morphed together href="http://www.linkboots.com/ugg-classic-cardy-5819-c-26.html"> <strong>classic cardy ugg boots</strong?></a><strong></strong> are all your choices. tags



TOP