|
Post by justlooking on Apr 22, 2004 13:22:00 GMT -8
HI i want to put asimple java game on my site but not in to headers or footers but in the thread it's self can it be done? the code below is a check box code, works well in forum footers but looks messy and i can only use per forum as the maths ect cancel each other out.
so i would love to be able to put this in a thread on my site and maybe have diff games in each thread would be really kool.
any help would be great thanks
<SCRIPT LANGUAGE="JavaScript"> <!--// Copyright (c) 1996 Tomer Shiran. All rights reserved. // Permission given to use this script provided that the copyright // notice remains as is. Additional scripts and information are // available at http://www.geocities.com/SiliconValley/9000/ // assign initial values to global variables var total = 0 var play = false // react to a click in a checkbox (element == clicked checkbox object)
function display(element) { // assign instance of Date object representing current time var now = new Date() // if the game has not started yet if (!play) { // game starts now play = true // milliseconds since 1970 for time at beginning startTime = now.getTime() } // if more than 20 seconds have passed since startTime was last set if (now.getTime() - startTime > 20000) { // reject modification (make "read-only") element.checked = !element.checked // terminate function return } // if the clicked checkbox is now checked if (element.checked) // increment total total++ else // decrement total total-- // display total in text object element.form.num.value = total }
function restart(form) { // set global variables back to initial values total = 0 play = false // uncheck all 100 checkboxes for (var i = 1; i <= 100; ++i) { // uncheck current checkbox form.elements[i].checked = false } } // --> </SCRIPT> </HEAD>
<SCRIPT LANGUAGE="JavaScript"> <!--// immediate script (executed before the other script because it is deferred) document.write("<FORM><CENTER>") document.write('<INPUT TYPE="text" VALUE="0" NAME="num" SIZE=10 onFocus="this.blur()"><br>') document.write("<HR SIZE=1 WIDTH=40%>") // use loop to create a 10 x 10 square of checkboxes for (var i = 0; i < 10; ++i) { for (var j = 0; j < 10; ++j) { // write checkbox with "display(this)" as event handler script document.write('<INPUT TYPE="checkbox" onClick="display(this)">') } document.write("<br>") } document.write("<HR SIZE=1 WIDTH=40%>") // create button to call restart function to restart game document.write('<INPUT TYPE="button" VALUE="restart" onClick="restart(this.form)">') document.write("</CENTER></FORM>") // --> </SCRIPT>
|
|
|
Post by Merlin on Apr 22, 2004 16:12:15 GMT -8
mm embed... <!--hide //--> <embed></embed>
Eh? I think that should help try one of those
|
|
|
Post by justlooking on Apr 22, 2004 23:47:19 GMT -8
do i put this in the thread it's self?
|
|
|
Post by Merlin on Apr 23, 2004 14:14:51 GMT -8
Well i dont know if what you wanna do will work because im a noob i guess you can try [embed][/embed] in the thread im not sure tho
|
|
|
Post by ShadowyOne on Apr 23, 2004 15:30:45 GMT -8
No, Kakashi, that doesn't work. Hmm...I don't know either. I guess Nitro can help you out. I remember seeing an embedding code before, but not to put in threads.
|
|
|
Post by /*nitro on Apr 23, 2004 19:28:36 GMT -8
No, Kakashi, that doesn't work. Hmm...I don't know either. I guess Nitro can help you out. I remember seeing an embedding code before, but not to put in threads. errrr ummm i did? maybe your talking about a glow of the same color as the bground [glow=red,2,300]TEXT[/glow] in the color area change it to the color of the website err then for html u must create a table to sourround the code then put in a whole <glow=red,2,300>TEXT</glow>
|
|
|
Post by justlooking on Apr 23, 2004 23:29:01 GMT -8
errrr ummm i did? maybe your talking about a glow of the same color as the bground [glow=red,2,300]TEXT[/glow] in the color area change it to the color of the website err then for html u must create a table to sourround the code then put in a whole <glow=red,2,300>TEXT</glow> no i need help with a java game code not a colour script
|
|
|
Post by ShadowyOne on Apr 24, 2004 10:05:34 GMT -8
So you're trying to make a coding game appear in a thread?
|
|
|
Post by justlooking on Apr 24, 2004 11:05:11 GMT -8
So you're trying to make a coding game appear in a thread? HI i want to put a simple java game on my site but not in to headers or footers but in the thread it's self can it be done?
|
|
|
Post by /*nitro on Apr 24, 2004 12:43:03 GMT -8
HI i want to put a simple java game on my site but not in to headers or footers but in the thread it's self can it be done? no. ubbc can only be put in posts.
|
|