Make your own free website on Tripod.com

The Church of Universal Love and Music

 
 
 
 

Pong Source code:

 <html>
<head><link rel="stylesheet" type="text/css" href="xpMenu.css">
<SCRIPT>
//Script Created by Troll X
//AKA FenixFire


window.onerror=new Function("return true")
var dx;
var dy;
var scor = 0;
var dod;
var pscor = 0;
var escor = 0;
var point;
var los;
var reversal = 0;


function startUp()
{
score.scorebox.value = " "
score.box.value= " "
score.reverse.value = " "
}

function initialize()
{
dx = 2;
dy = 2;
los = Math.round(21 * Math.random()) + 1;
point = 0;
hefr = Math.round(200 * Math.random()) + 35;
vred = Math.round(100 * Math.random()) + 100;
ball.style.posTop = hefr;
ball.style.posLeft = vred;

moveBall()
}

function moveBall()
{

var xp = ball.style.posLeft;
var yp = ball.style.posTop;
var sig = paddle.style.posTop;
var gis = paddle.style.posLeft;
var hit = document.elementFromPoint(xp,yp);
var pore = 215
var place = pore - 1;

if (point < 7)
{
if ((yp >= 15) && (yp <= 215))
paddle.style.posTop = yp - 6;
else
paddle.style.posTop = place
}
if (point >= 7)
{
if ((yp >= 15) && (yp <= 215))
paddle.style.posTop = yp + 13;
else
paddle.style.posTop = place
}

if ((yp < 27) || (yp > 258))
dy = dy * -1

if (point >= 15)
paddle.style.posTop = sig

if (xp >= 358){
escor = escor + .5
score.scorebox.value = " " +escor+ " "
gameLose()
return
}

if (xp <= 27)
{
pscor = pscor + .5
score.box.value = " " +pscor+ " "
gameWin()
return
}


if (hit != null)
{
if (hit.id == "paddle"){
dx = dx * -1;
point = point + 1
}
else if (hit.id == "enemy") {
dx = dx * -1;
}
}



ball.style.posTop += dy
ball.style.posLeft += dx



window.setTimeout("moveBall()", 1, "JavaScript");


}

function movePaddle()
{
var ypos = window.event.y;
if ((ypos >= 15) && (ypos <= 230))
enemy.style.posTop = ypos;
}

function gameLose()
{
if (escor >= 15){
goal.style.visibility = "hidden"
lose.style.visibility = "visible"
alert("Sorry, please try again. You lost by the score of " +escor+ " to " +pscor+ ".")
history.go(-1)
}
else
return
}

function gameWin()
{
if (pscor >= 15){
goal.style.visibility = "hidden"
win.style.visibility = "visible"
alert("Congrats, you won!!!. You won by the score of " +pscor+ " to " +escor+ ".")
//history.go(-1)
}
else
return
}

function reverseIt()
{
if (reversal <= 9)
{
if (window.event.keyCode == 118){
dy = dy * -1
reversal = reversal + 1
score.reverse.value = reversal
}
if (window.event.keyCode == 104){
dx = dx * -1
reversal = reversal + 1
score.reverse.value = reversal
}
}
}

</SCRIPT>

<title>CULM PHONG</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


</head>

<body bgcolor="#FFFFFF" onLoad="startUp()" onmousemove="movePaddle()" onKeypress="reverseIt()">
<center>
<TABLE cellSpacing=0 cellPadding=0 width="82%" border=0 align:"center">
<TR>
<TD width="100%" align="center">
<p align="center">
<img border="0" src="images/churchlogo.jpg" width="125" height="125">
</p>
</TD>
</TR>
</TABLE></center>
<p align="center"><FONT face=Ravie color=#ff0000 size=5>The Church of Universal Love and
Music</FONT>
<FONT FACE="Tahoma"><br> </FONT></p>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> <td valign="top" width="245"> <table width="215" border="0" cellspacing="0" cellpadding="0">
<tr> <td colspan="3" height="28" background="images/menuup.gif"> <div align="center">
&nbsp;</div></td></tr> <tr> <td width="9" height="76" background="images/menuleft.gif">&nbsp;</td><td width="194" height="76">
<FONT FACE="Tahoma"><br><div>
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv">
<div class="topItem">Quick Links</div>
<div class="dropMenu1">
<div class="subMenu1" style="display:none;">
<span class="subItem1"><a href="frontdoor.htm">Home</a></span><br>
<span class="subItem1"><a href="calendar.htm">Goings On</a></span><br>
<span class="subItem1"><a href="churchinfo.htm">Church Info</a></span><br>
<span class="subItem1"><a href="past-events.htm">Past Events</a></span><br>
</div><!-- *******************************End Menu************************** -->
</div><div>
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv">
<div class="topItem">Mission</div>
<div class="dropMenu1">
<div class="subMenu1" style="display:none;">
<span class="subItem1"><a href="mission.htm">Mission Statement</a></span><br>
<span class="subItem1"><a href="comser.htm">Community Service</a></span><br>
<span class="subItem1"><a href="projects.htm">Projects</a></span><br>
</div><!-- *******************************End Menu************************** -->
</div><div>
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv">
<div class="topItem">Support</div>
<div class="dropMenu1">
<div class="subMenu1" style="display:none;">
<span class="subItem1"><a href="donate.htm">Donations</a></span><br>
<span class="subItem1"><a href="support.htm">Support</a></span><br>
<span class="subItem1"><a href="products.htm">Products &amp; Services</a></span><br>
</div><!-- *******************************End Menu************************** -->
</div><div>
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv">
<div class="topItem">Fun Stuff</div>
<div class="dropMenu1">
<div class="subMenu1" style="display:none;">
<span class="subItem1"><a href="fungames.htm">Fun & Games</a></span><br>
<span class="subItem1"><a href="educate.htm">Self Education</a></span><br>
<span class="subItem1"><a href="contact.htm">Contact Us</a></span><br>
</div><!-- *******************************End Menu************************** -->
</div><br>
</div></FONT></td><td width="12" height="76" background="images/menuright.gif">&nbsp;</td></tr>
<tr> <td colspan="3" height="28" background="images/menudown.gif">&nbsp;</td></tr> </table><FONT FACE="Tahoma"><br>
</FONT></td><td width="455" valign="top">
<table width="455" border="0" cellspacing="0" cellpadding="0" background="images/longmenu.gif" height="34">
<tr> <td><b><font face="Tahoma" size="4">CULM Phong</font></b></td></tr> </table>
<p>Here is an oldie but a goodie&nbsp; from the CULM IT/IS Group &quot;WayBack&quot;
Machine.</p>
<center>
<p align="right">
<iframe name="I1" width="722" height="449" src="phong.htm" scrolling="no" border="0" frameborder="0">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p></td></tr>
<tr> <td valign="top" width="245"> &nbsp;</td><td width="455" valign="top">
&nbsp;</td></tr> </table><FONT FACE="Tahoma"><br> </FONT><table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
<tr> <td> <div align="left"></div><DIV ALIGN="CENTER"><FONT SIZE="2" FACE="Tahoma">Copyright
2006 The Church of Universal Love and Music. All Rights Reserved</FONT></DIV><TABLE WIDTH="700" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="20" ALIGN="center">
<TR BGCOLOR="#000000"> <TD BGCOLOR="#336666"><DIV ALIGN="center">&nbsp;</DIV></TD></TR> </TABLE></td></tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-676573-1";
urchinTracker();
</script><script type="text/javascript" src="xpMenu.js"></script></body>
</html><center>
<span style="width: 100%; font-family: helvetica; font-size: 6px; Filter: Alpha(Opacity=0,FinishOpacity=0, Style=1);">
&nbsp;</span></center><br><br>
 


Copyright 2006 The Church of Universal Love and Music. All Rights Reserved