123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

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

Moving Image

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

Description : A picture that moves arround the screen just like in Black & Whites Pages

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Moving Picture around the screen www.coyoteelabs.go.ro</title>
</head>

<body bgcolor="#000000" Text="#FFFF00">

<!--Vizit us at www.coyoteelabs.go.ro-->
<!--The code begins here-->
<SCRIPT language="JavaScript1.2">
document.write("<body background="bg2.gif" ALINK="#CCCCAA" LINK="#CCCCAA" VLINK="#665522">");
/*
Floating Spirit
*/
var cursorpath;
If(Math.random() > 0.5)
{
cursorpath="evil.gif"; //just Replace "evil.gif" With the name of your picture
}
Else
{
cursorpath="good.gif"; //just Replace "good.gif" With the name of your picture

}

If (document.layers)
{document.write("<LAYER NAME='PoInTeRs' LEFT=10 TOP=10><img src='"+cursorpath+"' width=115 height=137></LAYER>")}
Else If (document.all){document.write("<div id='pOiNtErS' style='position:absolute;top:10px;left:10px;width:115px;height:137px;z-index:50'><img src='"+cursorpath+"' width=115 height=137></div>")}

count=-1;
move=1;

Function Curve(){
abc=New Array(0,1,1,1,2,3,4,0,6,-1,-1,-1,-2,-3,-4,0,-6)
For (i=0; i < abc.length; i++)
{var C=Math.round(Math.random()*[i])}
howbend=abc[C];
setTimeout('Curve()',1900);
return howbend;
}
ypos=10;
xpos=10;

degree = 60;
Function MoveRandom(){
PathBend=degree+=howbend;//ok!
y = 4*Math.sin(PathBend*Math.PI/180);
x = 6*Math.cos(PathBend*Math.PI/180);
If (document.layers){
ypos+=y;
xpos+=x;
document.PoInTeRs.top=ypos+window.pageYOffset;
document.PoInTeRs.left=xpos+window.pageXOffset;
}
Else If (document.all){
ypos+=y;
xpos+=x;
document.all.pOiNtErS.style.top=ypos+document.body.scrollTop;
document.all.pOiNtErS.style.left=xpos+document.body.scrollLeft;
}
T=setTimeout('MoveRandom()',50);
}
Function edges(){
If (document.layers){
If (document.PoInTeRs.left >= window.innerWidth-40+window.pageXOffset)degree=Math.round(Math.random()*45+157.5);
If (document.PoInTeRs.top >= window.innerHeight-30+window.pageYOffset)degree=Math.round(Math.random()*45-112.5);
If (document.PoInTeRs.top <= 2+window.pageYOffset) degree = Math.round(Math.random()*45+67.5);//OK!
If (document.PoInTeRs.left <= 2+window.pageXOffset) degree = Math.round(Math.random()*45-22.5);//OK!
}
Else If (document.all)
{
If (document.all.pOiNtErS.style.pixelLeft >= document.body.offsetWidth-45+document.body.scrollLeft)degree=Math.round(Math.random()*45+157.5);
If (document.all.pOiNtErS.style.pixelTop >= document.body.offsetHeight-35+document.body.scrollTop)degree=Math.round(Math.random()*45-112.5);
If (document.all.pOiNtErS.style.pixelTop <= 2+document.body.scrollTop) degree = Math.round(Math.random()*45+67.5);//OK!
If (document.all.pOiNtErS.style.pixelLeft <= 2+document.body.scrollLeft) degree = Math.round(Math.random()*45-22.5);//OK!
}
setTimeout('edges()',100);
}
Function starteffect(){
Curve();
MoveRandom();// onUnload="opener.gO()"
edges();
}

If (document.all||document.layers)
window.onload=starteffect
</script>
<!--The code ends here-->

</body>

</html>
 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG