Can I use this code in game?
Posted: Tue Mar 23, 2004 11:09 pm
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Hanz Broden (webmeister@v-wave.com) -->
<!-- Web Site: http://plaza.v-wave.com/dotcom -->
<!-- Modified By: Ronnie T. Moore, Editor -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function flipCoin() {
var x = parseInt(Math.random() * 2, 10);
coinsrc = (!x) ? "heads.gif" : "tails.gif";
document.coinform.coinbutton.value = 'Flipping';
ID = window.setTimeout("changeCoin();", 750);
}
function changeCoin() {
document['coin'].src = coinsrc;
document.coinform.coinbutton.value = 'Flip Coin';
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=coinform>
<table border=0 height=200>
<tr valign=top>
<td><input type=button name=coinbutton value="Flip Coin" onClick="flipCoin();"></td>
<td><img name=coin src="heads.gif" width=190 height=190></td>
</tr>
</table>
</form>
</center>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.29 KB -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Hanz Broden (webmeister@v-wave.com) -->
<!-- Web Site: http://plaza.v-wave.com/dotcom -->
<!-- Modified By: Ronnie T. Moore, Editor -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function flipCoin() {
var x = parseInt(Math.random() * 2, 10);
coinsrc = (!x) ? "heads.gif" : "tails.gif";
document.coinform.coinbutton.value = 'Flipping';
ID = window.setTimeout("changeCoin();", 750);
}
function changeCoin() {
document['coin'].src = coinsrc;
document.coinform.coinbutton.value = 'Flip Coin';
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=coinform>
<table border=0 height=200>
<tr valign=top>
<td><input type=button name=coinbutton value="Flip Coin" onClick="flipCoin();"></td>
<td><img name=coin src="heads.gif" width=190 height=190></td>
</tr>
</table>
</form>
</center>
<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 1.29 KB -->