hey aquilo, how's it going?
I know that script by heart because I learned every basic DHTML-thing from it.
So let me help you:
I copied your code and got rid of them errors:
This is the first one. the initialisation of the array:.............................
if (document.images) {
names = new Array( "zero" , "one" , "two" , "three");
........................................................................................................
I called them nubers so it is easier to see the beauty o the code.
You can call them whatever you want but as DocOzone said:
YOU START WITH ZERO. that means in your array:
names = new Array( "me" , "resume" , "atari" , "design" );
"me" would referred to as 0 (or "zero")
"resume" would referred to as 1 (or "one")
"atari" would referred to as 2(or "two")
"design" would referred to as 3 (or "three")
the next thing is to bring them together:........................................
<a href="http://www.jasonarencibia.com/me"
onMouseover="swap(0,2);
window.status='about me...';
return true;"
onMouseout="swap(0,0);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="zero" border="0"></a>
.........................................................................................................................................................
ok, this should be the example to explain:
swap(0,2) swaps the object with the value 0 (which would be the first name in our list=>"zero)
with the button with the value 2 which would be /img-hen/gui/button/me2.gif";
on the mouse out, the object valued 0 called "zero" by my code but "me" in yours is swapped
to the picture with the value 0 which would be the first picture initialized: "/img-hen/gui/button/me1.gif";
.........................................................................................................................................................
<a href="http://www.jasonarencibia.com/resume.htm"
onMouseover="swap(1,3);
window.status='my resume';
return true;"
onMouseout="swap(1,1);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="one" border="0"></a>
<a href="http://www.jasonarencibia.com/atari"
onMouseover="swap(2,6);
window.status='atari';
return true"
onMouseout="swap(2,2);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="two" border="0"></a>
<a href="http://www.jasonarencibia.com/design/"
onMouseover="swap(3,7);
window.status='design';
return true;"
onMouseout="swap(3,3);
window.status=MyNameIs;
return true;"><img src="/img-hen/gui/button/me1.gif" name="three" border="0"></a></td>
............................................................................................................................................................
Some other infos:
Using numbers starting from "zero" to call the objects is easier than individual words. You can refer to them easier.
And Always check what object you want to swap what picture before ou come in here and ask *g* (They don;t like it...)
AND NEVER EVER lose the fun coding.
k10
only change remains