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 1785 Banfa 9,065
Recognized Expert Moderator Expert
Change this
[html]<img src='"+cursorpa th+"' width=60 height=66>[/html]
to
[html]<a href="[NextPage]"><img border="0" src='"+cursorpa th+"' 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 of submenu links I am thinking of switching
to javascript, which seems to work fine on my PC so far (sorry, it's not
online yet).
|
by: Julius Mong |
last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a>
execute some Javascript onclick:
http://www.google.co.uk/search?q=cache:OPDjMJfL50sJ:www.adobe.com/svg/indepth/pdfs/ReadMewin.pdf+adobe+svg+javascript+problem&hl=en&ie=UTF-8#5
4. Due to design limitations of Netscape, avoid using HTML with the
following form: <a href="#" onclick="myScriptWhichModifiesSVG()">The problem
is that JavaScript responds to the 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 suggestions?
As for what is displayed on the screen, I just want it to say:
Today is: 12578 (or however many days have passed since that date.)
|
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 href="lemurs.html">Lemurs</a></li>
<li><a href="chameleons.html">Chameleons</a></li>
</ul>
<ul>
| |
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 knowledge. If anyone can help me, i would be really grateful.
These are the errors i was speaking about:
--------------------------------------------
Line: 58
|
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 paragraph. This will be on a web page.
Thanks!
--Randy Starkey
|
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:
Sub loadPage(sender As Object, e As System.EventArgs, pageURL as
String)
|
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 willing to check
my website with Firefox. Sounds like I might have a float problem/div
problem that is visible to Firefox users only
Here is my problem:
>From my PC and majority of viewers of my webpage they see the Flickr
badge (photos) on the...
|
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 value="javascript:onCreatePrintable()">Print Map</option>
<option value="javascript:onFindLatLong()">Find Lat/Long</option>
</select>
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |