PDA

View Full Version : CMotion Image Gallery II & tables



Nolanarts
04-26-2008, 03:25 PM
1) Script Title: CMotion Image Gallery II & Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery2.htm

3) Describe problem: CMotion Image Gallery II portfolio gallery with semitry and image swap...

:confused:

Definitely new to external js & css

THIS is the code im trying to get a handle on... You can see what im wanting to do... I would like the right side to sroll as the left does.
im not sure how. I know i need to make alterations to the element ids in css & / or js files. ... i think.
currently im just linking to the css & js files links on the site "CMotion Image Gallery II page for functionality, but will change that once i know what to do next

http://www.dynamicdrive.com/dynamicindex4/motiongallery2.js
http://www.dynamicdrive.com/dynamicindex4/gallerystyle2.css

Also on my mind is... Is there a way to also incorperate the Image Thumbnail Viewer II script ?
and would this clean up my script with the on/overmouse imageswap code im using now?

I appreciate any help or advice on this thank you ahead...
NolanArts


Here is a simplified code form of my code...



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nolan Arts</title>
<link rel="stylesheet" href="http://www.dynamicdrive.com/dynamicindex4/gallerystyle2.css" />

<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex4/motiongallery2.js"></script>


<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>


</head>

<body>

<table width="968" height="754" border="0" align="center" cellpadding="0" cellspacing="3">
<!--DWLayoutTable-->


<tr>
<td width="100" valign="top"><div style="overflow:hidden;">
<div id="motioncontainer" style="width:100px; height:350px; overflow:hidden; position: relative;">
<div id="motiongallery" style="position:absolute; left:0; top:0;">

<!--Gallery Contents below-->

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image30','','http://www.nolanarts.com/Assets/pics/thumbs/bearandcrow2.jpg','blank','','http://www.nolanarts.com/Assets/pics/bearandcrow.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/bearandcrow1.jpg" name="Image30" width="100" height="100" border="0" id="Image30" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image32','','http://www.nolanarts.com/Assets/pics/thumbs/passingthrough2.jpg','blank','','http://www.nolanarts.com/Assets/pics/passingthrough.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/passingthrough1.jpg" name="Image32" width="100" height="100" border="0" id="Image32" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/highway2.jpg','highway2','','http://www.nolanarts.com/Assets/pics/thumbs/highway12.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/highway11.jpg" name="highway2" width="100" height="100" border="0" id="highway2" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/highway3.jpg','highway3','','http://www.nolanarts.com/Assets/pics/thumbs/highway32.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/highway31.jpg" name="highway3" width="100" height="100" border="0" id="highway3" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/highway4.jpg','highway4','','http://www.nolanarts.com/Assets/pics/thumbs/highway42.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/highway41.jpg" name="highway4" width="100" height="100" border="0" id="highway4" /></a><br />

<!--End Gallery Contents-->

</div>
</div>
</div>

</td>







<td width="750" valign="top"><img src="../Assets/pics/blank.jpg" name="blank" width="750" height="750" id="blank" /></td>






<td width="100" valign="top"><div style="overflow:hidden;">
<div id="motioncontainer" style="width:100px; height:350px; overflow:hidden; position: relative;">
<div id="motiongallery" style="position:absolute; left:0; top:0;">

<!--Gallery Contents below-->

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/self.jpg','self','','http://www.nolanarts.com/Assets/pics/thumbs/self2.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/self1.jpg" name="self" width="100" height="100" border="0" id="self" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/knoxvill.jpg','knoxville','','http://www.nolanarts.com/Assets/pics/thumbs/knoxvill2.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/knoxvill1.jpg" name="knoxville" width="100" height="100" border="0" id="knoxville" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/celticwolf.jpg','celticwolves','','http://www.nolanarts.com/Assets/pics/thumbs/celticwolf2.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/celticwolf1.jpg" name="celticwolves" width="100" height="100" border="0" id="celticwolves" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/stuff.jpg','stuff','','http://www.nolanarts.com/Assets/pics/thumbs/stuff2.jpg',1)"><img src="http://www.nolanarts.com/Assets/pics/thumbs/stuff1.jpg" name="stuff" width="100" height="100" border="0" id="stuff" /></a><br />
<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('blank','','http://www.nolanarts.com/Assets/pics/planetpaintball.jpg','planetpaintball','','http://www.nolanarts.com/Assets/pics/thumbs/planetpaintbal2.jpg',1)"><img src="../Assets/pics/thumbs/planetpaintball1.jpg" name="planetpaintball" width="100" height="100" border="0" id="planetpaintball" /></a>

<!--End Gallery Contents-->

</div>
</div>
</div>
</td>
</tr>
</table><br />




</body>

</html>