Hi, I've been using a javascript script to create a dragon that flies across the page. Anyways, I'd like to make it so when you click the dragon it takes you to a new page. Was wondering if anyone could help me out here.
Below is the complete script. - <SCRIPT language="JavaScript1.2">
-
-
-
var cursorpath="http://i68.photobucket.com/albums/i9/worklog_halcyon/Misc/pet1_lohi_dog.png"
-
-
-
if (document.layers)
-
{document.write("<LAYER NAME='PoInTeRs' LEFT=10 TOP=10><img src='"+cursorpath+"' width=60 height=66></LAYER>")}
-
else if (document.all){document.write("<div id='pOiNtErS' style='position:absolute;top:10px;left:10px;width:60px;height:66px;z-index:100'><img src='"+cursorpath+"' width=60 height=66></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>
1 1761 Banfa 9,065
Expert Mod 8TB
Change this
[html]<img src='"+cursorpath+"' width=60 height=66>[/html]
to
[html]<a href="[NextPage]"><img border="0" src='"+cursorpath+"' width=60 height=66></a>[/html]
in 2 places
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sklett |
last post by:
Hi
I have code that writes links, these links call a javascript function and
pass in a url.
So let;s say I have a client side function like this
function DoIt( url )
{
alert(url);
}
|
by: Michael Jaeger |
last post by:
Dear group,
I administrate the web site of a German school
(www.gymnasium-burgdorf.de\test.htm) and so far this site has been
designed using
HTML and CSS only.
Due to the increasing number...
|
by: Julius Mong |
last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a>
execute some Javascript onclick:
...
|
by: Tom |
last post by:
Please help.
I need a quick little scrpit to place on a web page that will count
how many days have passed since January 1, 1970. I have ZERO
experience writing ANY scripts. Anyone have any...
|
by: michael |
last post by:
Is it possible to get all href URLs contained in a unordered list and place
them in an array?
Or in fact two different arrays, differently named one for each <ul> group?
<ul>
<li><a...
|
by: Sergio del Amo |
last post by:
Hi,
I wrote some functionality for a Web Page with Javascript. My code works
perfectly for Firefox but not for IE.
I become some errors apparently all based in the same problem wich
scapes to my...
|
by: Randy Starkey |
last post by:
Hi,
Does anyone know where I can get a script that show a little plus sign after
a line of text, that when you click the plus sign, more text is revealed on
that same page, like a continuing...
|
by: Shapper |
last post by:
Hello,
I am working on an ASP.NET/VB web site.
I have several links including menu links.
Considerer a want to load a page named page.aspx.
I can do it using javascript. Or using this code:...
|
by: dsimmons |
last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a
problem that someone thinks might be associated with Firefox browsers.
I'm hoping to find someone in this forum that might be...
|
by: Steve M. |
last post by:
Hello all.
I have a dropdown list:
<select name="select" class="mapMenu" onChange="JumpToIt(this)">
<option selected value="none">Select a Tool --</option>
<option...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |