PDA

View Full Version : CMotion Gallery question



inthepink
09-18-2006, 02:28 PM
1) Script Title: CMotion Gallery

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

3) Describe problem: I am a new Adobe Golive 6 user trying to incorporate this gallery into my page. I have placed the code into the header and body of my page as per instructions, but don't know how to get the css and javascript files where they need to be in Golive. (I think I may have gotten the css file where it needs to be.)

I have thumbnails and links set up to open my pictures up larger in new windows, but the strip isn't moving.

I was also wondering if it would be possible to "embed" the Lightbox Picture Viewer script (http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm) into CMotion gallery so my pictures will open in that neat darkened screen effect when they are clicked on.

Any help would be appreciated.

James

jscheuer1
09-18-2006, 06:54 PM
Well, one thing at a time. Getting the external script and css files where they need to be is simply a matter of putting those files where you say that they are in the code. Using the exact:


<link rel="stylesheet" type="text/css" href="gallerystyle.css" />

and:


<script type="text/javascript" src="motiongallery.js">

tags as instructed on the demo page means that these files belong in the same folder as the page that is using them. If you put them in other folders, their paths must be included in the href and src attributes, respectively.

Once you get that working, you should be able to use lightbox with it by linking the lightbox files to your page as instructed for it and by using the lightbox syntax here:


<nobr id="trueContainer"><a href="javascript:enlargeimage('dynamicbook1.gif')"><img src="dynamicbook1.gif" border=1></a> <a href="javascript:enlargeimage('dynamicbook1.gif', 300, 300)"><img src="dynamicbook1.gif" border=1></a> <a href="http://www.dynamicdrive.com"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a></nobr>

You may have to add to the fillup function of cmotion's motiongallery.js file:


function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}

crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
initLightbox();
}

inthepink
09-18-2006, 08:56 PM
John,

Thank you very much for your detailed help.
It is much appreciated.

James