Jump to content


TEAM 3D ROSTER


2 replies to this topic

#1 Sh0ck

    Young Padawan

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 24 August 2006 - 04:59 PM

ok so can anyone help me out.

My website is

http://www.teamhld.c...erved/index.php

you can see the roster box on the left I want ot make it like http://www.team3d.com/ <---- right hand side

I think its called MM_swapImage and MM_Preload, but i cant find the right tutorial.

Moved to correct forum area ;)... luv shiv :D

Edited by SHIVMOO, 25 August 2006 - 04:22 PM.


#2 Sh0ck

    Young Padawan

  • Members
  • Pip
  • 9 posts
  • Gender:Male

Posted 29 August 2006 - 10:40 PM

****************** :ph34r:

#3 mattyK

    Young Padawan

  • Members
  • Pip
  • 201 posts
  • Location:Surrey, BC, Canada
  • Interests:Graphic Design, Soccer, Hockey, Guitar, CKY

Posted 29 August 2006 - 11:41 PM

This is what dreamweaver does with rollovers... I remember learning how to do one that changed a different image than the one you rolled over (like you're wanting) and I'm pretty sure I remeber the concept...

put this code (from dreamweaver) between your head tags

<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

Then, for each persons image, code it like such

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('name','','url_of_image_of_persons_name',1)"><img src="image_of_person" alt="whatever" border="0"></a>

this means that on rollover, it will change the image named 'name' to the image src 'url_of_image_of_persons_name'

change the 'url of image of persons name' for each person, as well as their own pictures url,

Then finally, code the text image of their names like this

<img src="image_of_default_text" alt="Hover over a picture to see their name" name="name" border="0">

so now, when they mouse over a picture, that picture tells the image named "name" to switch from "image_of_default_text" to the image that is sourced in their <a> tag (url_of_image_or_persons_name)

Edited by mattyK, 29 August 2006 - 11:42 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users